def guess(self, dep, *args, **kwargs): vmax = get_peak(dep, *args) tMax = vmax / 5.88e+10 t = {'val': tMax, 'min': tMax / _guess_ampl_scale, 'max': tMax * _guess_ampl_scale} norm = guess_amplitude(dep, *args) c_cm = 2.99792458e+10 h_erg = 6.6260693e-27 factor = numpy.exp(2.82) * numpy.square(c_cm) / h_erg / 2. modampl = norm['val'] * factor / numpy.power(vmax, 3.) mod = {'val': modampl, 'min': modampl / _guess_ampl_scale, 'max': modampl * _guess_ampl_scale} param_apply_limits(mod, self.ampl, **kwargs) param_apply_limits(t, self.t, **kwargs)
def guess(self, dep, *args, **kwargs): if args[0][0] > args[0][-1]: self.space.val = 1 Emax = get_peak(dep, *args) tMax = Emax / 1.594 kt = {'val': tMax, 'min': tMax / _guess_ampl_scale, 'max': tMax * _guess_ampl_scale} param_apply_limits(kt, self.kt, **kwargs) norm = guess_amplitude(dep, *args) modampl = norm['val'] * (numpy.exp(Emax / tMax) - 1) / \ numpy.square(Emax) mod = {'val': modampl, 'min': modampl / _guess_ampl_scale, 'max': modampl * _guess_ampl_scale} param_apply_limits(mod, self.ampl, **kwargs)