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,19 +229,20 @@ def adjust_cooling_schedule(self):
229229 """
230230 Adjust the cooling schedule based on the misfit.
231231 """
232- ratio = self .invProb .phi_d / self .misfit_from_chi_factor (self .chifact_target )
232+ if self .metrics .start_irls_iter is None :
233+ return
233234
234- if (
235- np .abs (1.0 - ratio ) > self .misfit_tolerance
236- and self .metrics .start_irls_iter is not None
237- ):
235+ ratio = self .invProb .phi_d / self .misfit_from_chi_factor (self .chifact_target )
236+ if np .abs (1.0 - ratio ) > self .misfit_tolerance :
238237
239238 if ratio > 1 :
240- ratio = np .mean ([2.0 , ratio ])
239+ update_ratio = 1 / np .mean ([0.75 , 1 / ratio ])
241240 else :
242- ratio = np .mean ([0.75 , ratio ])
241+ update_ratio = 1 / np .mean ([2.0 , 1 / ratio ])
243242
244- self .cooling_factor = ratio
243+ self .cooling_factor = update_ratio
244+ else :
245+ self .cooling_factor = 1.0
245246
246247 def initialize (self ):
247248 """
You can’t perform that action at this time.
0 commit comments