Exemple #1
0
 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)
Exemple #2
0
    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)