def guess(self, dep, *args, **kwargs): ampl = guess_amplitude(dep, *args) pos = get_position(dep, *args) fwhm = guess_fwhm(dep, *args) param_apply_limits(pos, self.pos, **kwargs) norm = fwhm['val'] * numpy.sqrt(numpy.pi) * \ numpy.exp(lgam(self.index.val - 0.5) - lgam(self.index.val)) for key in ampl.keys(): ampl[key] *= norm param_apply_limits(ampl, self.ampl, **kwargs)
def guess(self, dep, *args, **kwargs): pos = get_position(dep, *args) fwhm = guess_fwhm(dep, *args) param_apply_limits(pos, self.pos, **kwargs) param_apply_limits(fwhm, self.fwhm, **kwargs) norm = guess_amplitude(dep, *args) if fwhm != 10: aprime = norm['val'] * self.fwhm.val * numpy.pi / 2. ampl = {'val': aprime, 'min': aprime / _guess_ampl_scale, 'max': aprime * _guess_ampl_scale} param_apply_limits(ampl, self.ampl, **kwargs) else: param_apply_limits(norm, self.ampl, **kwargs)
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)
def guess(self, dep, *args, **kwargs): norm = guess_amplitude(dep, *args) param_apply_limits(norm, self.norm, **kwargs)