diff --git a/Analyser/FitAnalyser.py b/Analyser/FitAnalyser.py index 34960cf..ec31a56 100644 --- a/Analyser/FitAnalyser.py +++ b/Analyser/FitAnalyser.py @@ -338,7 +338,7 @@ class DensityProfileBEC2dModel(Model): self.set_param_hint('condensate_fraction', expr=f'{self.prefix}BEC_amplitude / ({self.prefix}BEC_amplitude + {self.prefix}thermal_amplitude)') - def guess(self, data, x, y, negative=False, **kwargs): + def guess(self, data, x, y, negative=False, pureBECThreshold=0.5, **kwargs): """Estimate initial model parameter values from data.""" fitModel = TwoGaussian2dModel() pars = fitModel.guess(data, x=x, y=y, negative=negative) @@ -358,7 +358,7 @@ class DensityProfileBEC2dModel(Model): # thermal_sigmay=(pars_guess['B_sigmay'].value * s2) ) - if BEC_amplitude / (thermal_amplitude + BEC_amplitude) > 0.5: + if BEC_amplitude / (thermal_amplitude + BEC_amplitude) > pureBECThreshold: pars[f'{self.prefix}thermal_amplitude'].set(value=0) pars[f'{self.prefix}BEC_amplitude'].set(value=(thermal_amplitude + BEC_amplitude))