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 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 :
233237
234- if (
235- np .abs ( 1.0 - ratio ) > self . misfit_tolerance
236- and self . metrics . start_irls_iter is not None
237- ):
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 ])
238242
239- if ratio > 1 :
240- ratio = np .mean ([2.0 , ratio ])
243+ self .cooling_factor = update_ratio
241244 else :
242- ratio = np .mean ([0.75 , ratio ])
243-
244- self .cooling_factor = ratio
245+ self .cooling_factor = 1.0
245246
246247 def initialize (self ):
247248 """
You can’t perform that action at this time.
0 commit comments