28 #ifndef COMPONENTS_PROFILEFIT1D_H
29 #define COMPONENTS_PROFILEFIT1D_H
42 class SpectralElement;
242 #ifndef CASACORE_NO_AUTO_TEMPLATES
243 #include <components/SpectralComponents/ProfileFit1D.tcc>
244 #endif //# CASACORE_NO_AUTO_TEMPLATES
SpectralList getSubsetList(const SpectralList &list, casacore::Int which) const
Fit spectral components to a casacore::Vector of data.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
casacore::Vector< casacore::Bool > makeTotalMask() const
Functions.
casacore::Vector< casacore::Bool > getTotalMask() const
casacore::String errorMessage() const
Recover the error message.
casacore::Vector< T > itsY
casacore::Vector< casacore::Bool > itsRangeMask
casacore::Vector< casacore::Bool > itsDataMask
casacore::Vector< T > getResidual(casacore::Int which=-1, casacore::Bool fit=true) const
void copy(const ProfileFit1D< T > &other)
~ProfileFit1D()
Destructor.
casacore::Bool setGaussianElements(casacore::uInt nGauss)
Set a SpectralList of Gaussian SpectralElements to fit for.
casacore::Double getChiSquared() const
Get Chi Squared of fit.
Least Squares fitting of spectral elements to spectrum.
void clearList()
Clear the SpectralList of elements to be fit for.
void addElements(const SpectralList &list)
Describes (a set of related) spectral lines.
casacore::Bool fit()
Do the fit and return status.
ProfileFit1D & operator=(const ProfileFit1D &other)
Assignment operator.
ProfileFit1D()
Constructor.
casacore::Vector< casacore::Double > itsWeight
void addElement(const SpectralElement &el)
Add new SpectralElement(s) to the SpectralList (can be empty) of SpectralElements to be fit for...
casacore::Vector< T > getFit(casacore::Int which=-1) const
bool Bool
Define the standard types used by Casacore.
casacore::Bool setXRangeMask(const casacore::Vector< casacore::uInt > &startIndex, const casacore::Vector< casacore::uInt > &endIndex, casacore::Bool insideIsGood=true)
Set abscissa range mask.
casacore::Vector< casacore::Bool > getDataMask() const
Recover masks.
casacore::Vector< T > getEstimate(casacore::Int which=-1) const
Recover vectors for the estimate, fit and residual.
casacore::uInt nIterations() const
Get the number of iterations last fit.
casacore::Double getNumberIterations() const
Get number of iterations for last fit.
A set of SpectralElements.
casacore::Vector< casacore::Double > itsX
casacore::Bool setData(const casacore::Vector< casacore::Double > &x, const casacore::Vector< T > &y, const casacore::Vector< casacore::Bool > &mask, const casacore::Vector< casacore::Double > &weight)
Set abcissa, ordinate, mask and weights.
casacore::String itsError
void setElements(const SpectralList &list)
Set a SpectralList of SpectralElements to fit for.
String: the storage and methods of handling collections of characters.
casacore::Double chiSq() const
Get ChiSq of the last fit.
const SpectralList & getList(casacore::Bool fit=true) const
Recover the list of elements.
casacore::Vector< casacore::Bool > getRangeMask() const
casacore::Bool setXMask(const std::set< casacore::uInt > &indices, casacore::Bool specifiedPixelsAreGood)