Beispiel #1
0
    def guess(self, dep, *args, **kwargs):
        pos = get_position(dep, *args)
        param_apply_limits(pos, self.eb, **kwargs)

        ref = guess_reference(self.ref.min, self.ref.max, *args)
        param_apply_limits(ref, self.ref, **kwargs)

        norm = guess_amplitude_at_ref(self.ref.val, dep, *args)
        param_apply_limits(norm, self.ampl, **kwargs)
Beispiel #2
0
    def guess(self, dep, *args, **kwargs):
        ref = guess_reference(self.rest.min, self.rest.max, *args)
        param_apply_limits(ref, self.rest, **kwargs)

        norm = guess_amplitude_at_ref(self.rest.val, dep, *args)
        fwhm = get_fwhm(dep, *args)
        c_km = 2.99792458e+5
        if self.rest.val != 0:
            vsini = 2. * fwhm * c_km / numpy.sqrt(3.) / self.rest.val
            vs = {'val': vsini,
                  'min': vsini / _guess_ampl_scale,
                  'max': vsini * _guess_ampl_scale }
            param_apply_limits(vs, self.vsini, **kwargs)

        modampl = norm['val'] * numpy.pi * self.vsini.val * \
            self.rest.val / 2. / c_km
        mod = {'val': modampl,
               'min': modampl / _guess_ampl_scale,
               'max': modampl * _guess_ampl_scale}
        param_apply_limits(mod, self.ampl, **kwargs)