File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,20 +229,20 @@ def adjust_cooling_schedule(self):
229229 """
230230 Adjust the cooling schedule based on the misfit.
231231 """
232- if self .metrics .start_irls_iter is not None :
233- ratio = self .invProb .phi_d / self .misfit_from_chi_factor (
234- self .chifact_target
235- )
236- if np .abs (1.0 - ratio ) > self .misfit_tolerance :
232+ if self .metrics .start_irls_iter is None :
233+ return
237234
238- if ratio > 1 :
239- update_ratio = 1 / np .mean ([0.75 , 1 / ratio ])
240- else :
241- update_ratio = 1 / np .mean ([2.0 , 1 / ratio ])
235+ ratio = self .invProb .phi_d / self .misfit_from_chi_factor (self .chifact_target )
236+ if np .abs (1.0 - ratio ) > self .misfit_tolerance :
242237
243- self .cooling_factor = update_ratio
238+ if ratio > 1 :
239+ update_ratio = 1 / np .mean ([0.75 , 1 / ratio ])
244240 else :
245- self .cooling_factor = 1.0
241+ update_ratio = 1 / np .mean ([2.0 , 1 / ratio ])
242+
243+ self .cooling_factor = update_ratio
244+ else :
245+ self .cooling_factor = 1.0
246246
247247 def initialize (self ):
248248 """
You can’t perform that action at this time.
0 commit comments