casacore
|
#include <LatticeFit.h>
Static Public Member Functions | |
static uInt | fitProfiles (Lattice< Float > &outImage, Vector< Float > &fittedParameters, LinearFit< Float > &fitter, const Lattice< Float > &inImage, uInt whichAxis, const Vector< Bool > &fitMask, Bool returnResiduals) |
Fit baseline to lattice. More... | |
static uInt | fitProfiles (MaskedLattice< Float > *pOutFit, MaskedLattice< Float > *pOutResid, MaskedLattice< Float > &in, Lattice< Float > *pSigma, LinearFit< Float > &fitter, uInt axis, Bool showProgress=False) |
Fit baseline to MaskedLattice. More... | |
Fit every line of pixels parallel to any axis in a Lattice.
For every line in the lattice parallel to axis number whichAxis
(often axis number 2, typically the frequency axis in a spectral line cube) independently fit the functions in fitter at the positions where fitMask
is true.
Suppose one wanted to subtract a linear polynomial from every spectrum (3d axis) in an image. One could do this as follows:
Baseline fitting/continuum subtraction are important functions. This function essentially implements the IMLIN algorithm.
Definition at line 96 of file LatticeFit.h.
|
static |
Fit baseline to lattice.
Presently the fit parameters, other than the last one(s) in fitter, are lost. If returnResiduals
is True, return data-fit, otherwise return the fit. For baseline and continuum subtraction, returnResiduals would normally be True.
|
static |
Fit baseline to MaskedLattice.
Fit and residuals can be optionally written (leave pointers at zero to not write out these lattices) You can optionally specify a weights lattice (1.0 if not given).