Exemplo n.º 1
0
def __resid(pars, ncoefs=1, knots=None, order=3, irbkg=1, nfft=2048,
            kraw=None, mu=None, kout=None, ftwin=1, chi_std=None, **kws):

    coefs = [getattr(pars, FMT_COEF % i) for i in range(ncoefs)]
    bkg, chi = spline_eval(kraw, mu, knots, coefs, order, kout)
    if chi_std is not None:
        chi = chi - chi_std
    return realimag(xafsft_fast(chi*ftwin, nfft=nfft)[:irbkg])
Exemplo n.º 2
0
 def fftf(self, chi, kweight=None):
     """ forward FT -- meant to be used internally.
     chi must be on self.k_ grid"""
     self.make_karrays()
     if self.kwin is None:
         self.kwin = ftwindow(self.k_, xmin=self.kmin, xmax=self.kmax,
                              dx=self.dk, dx2=self.dk2, window=self.window)
     if kweight is None:
         kweight = self.get_kweight()
     cx = chi * self.kwin[:len(chi)] * self.k_[:len(chi)]**kweight
     return xafsft_fast(cx, kstep=self.kstep, nfft=self.nfft)
Exemplo n.º 3
0
def __resid(pars,
            knots=None,
            order=3,
            irbkg=1,
            nfft=2048,
            kraw=None,
            mu=None,
            kout=None,
            ftwin=1,
            **kws):
    coefs = [p.value for p in pars.values()]
    bkg, chi = spline_eval(kraw, mu, knots, coefs, order, kout)
    return realimag(xafsft_fast(chi * ftwin, nfft=nfft)[:irbkg])
Exemplo n.º 4
0
def __resid(pars, knots=None, order=3, irbkg=1, nfft=2048,
            kraw=None, mu=None, kout=None, ftwin=1, **kws):
    coefs = [p.value for p in pars.values()]
    bkg, chi = spline_eval(kraw, mu, knots, coefs, order, kout)
    return realimag(xafsft_fast(chi*ftwin, nfft=nfft)[:irbkg])