29 #ifndef IMAGES_IMAGEFIT1D_H
30 #define IMAGES_IMAGEFIT1D_H
47 template<
class T>
class ImageInterface;
52 class SpectralElement;
332 #ifndef CASACORE_NO_AUTO_TEMPLATES
333 #include <imageanalysis/ImageAnalysis/ImageFit1D.tcc>
334 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
void setAbscissa(const casacore::Vector< casacore::Double > &x)
Set the abscissa values prior to running setData.
A 1-D Specialization of the Array class.
casacore::Bool setXMask(const std::set< casacore::uInt > &indices, casacore::Bool specifiedPixelsAreGood)
casacore::Vector< T > getResidual(casacore::Int which=-1, casacore::Bool fit=true) const
casacore::Bool succeeded() const
did the fit succeed? should only be called after fit().
casacore::Vector< casacore::Bool > getTotalMask() const
Fit spectral components to a casacore::Vector of data from an image.
ImageFit1D & operator=(const ImageFit1D &other)
Assignment operator.
typename casacore::NumericTraits< T >::PrecisionType FitterType
casacore::Bool fit()
Do the fit and return convergence status.
void addElements(const SpectralList &list)
virtual Type type()
Return the type enum.
void clearList()
Clear the SpectralList of elements to be fit for.
casacore::Vector< T > getFit(casacore::Int which=-1) const
casacore::Vector< casacore::Double > _unityWeights
casacore::IPosition _sliceShape
casacore::Bool isValid() const
is the solution valid? If false, some external logic has called invalidate()
casacore::Double getChiSquared() const
Get Chi Squared of fit.
void clearList()
Clear the SpectralList of elements to be fit for.
void copy(const ImageFit1D< T > &other)
casacore::Vector< casacore::Double > makeAbscissa(ImageFit1D< T >::AbcissaType type, casacore::Bool doAbs, const casacore::Double *const &abscissaDivisor)
make the abscissa values, x.
void addElements(const SpectralList &list)
void _resetFitter()
void setWeightsImage (const casacore::ImageInterface<T>& im);
Describes (a set of related) spectral lines.
Char PrecisionType
Higher precision type (Float->Double)
A base class for astronomical images.
virtual void assign(const Array< T > &other)
Assign the other array (which must be of dimension one) to this vector.
std::shared_ptr< const casacore::ImageInterface< T > > _weights
void addElement(const SpectralElement &el)
Add new SpectralElement(s) to the SpectralList (can be empty) of SpectralElements to be fit for...
ImageFit1D()
Disallow default constructor.
casacore::Double getNumberIterations() const
Get number of iterations for last fit.
casacore::Bool _converged
casacore::Vector< T > getEstimate(casacore::Int which=-1) const
Recover vectors for the estimate, fit and residual.
void addElement(const SpectralElement &el)
Add new SpectralElement(s) to the SpectralList (can be empty) of SpectralElements to be fit for...
bool Bool
Define the standard types used by Casacore.
ProfileFit1D< FitterType > _fitter
In the future I will be able to template the fitter on T.
casacore::Vector< casacore::Bool > getDataMask() const
Recover masks.
void setGaussianElements(casacore::uInt nGauss)
Set a SpectralList of Gaussian SpectralElements to fit for.
template <class T, class U> class vector;
void invalidate()
flag the solution as invalid based on external criteria.
casacore::Vector< casacore::Bool > getTotalMask() const
Get Total Mask (data and range mask)
casacore::Vector< casacore::Double > _x
casacore::Double getNumberIterations() const
Get number of iterations for last fit.
casacore::Vector< casacore::Double > _weightSlice
A set of SpectralElements.
casacore::Double getChiSquared() const
Get Chi Squared of fit.
void setData(const casacore::IPosition &pos, casacore::Array< FitterType >(*yfunc)(const casacore::Array< FitterType > &)=0)
Set the data to be fit.
std::shared_ptr< const casacore::ImageInterface< T > > _image
void setElements(const SpectralList &list)
Set a SpectralList of SpectralElements to fit for.
String: the storage and methods of handling collections of characters.
const SpectralList & getList(casacore::Bool fit=true) const
Recover the list of elements.
void setElements(const SpectralList &list)
Set a SpectralList of SpectralElements to fit for.
casacore::Vector< casacore::Bool > getDataMask() const
get data mask
casacore::Bool converged() const
did the fit converge? should only be called after fit().
Interconvert pixel and world coordinates.
casacore::Bool setXMask(const std::set< casacore::uInt > &indices, casacore::Bool specifiedPixelsAreGood)
static casacore::Bool setAbcissaState(casacore::String &errMsg, ImageFit1D< T >::AbcissaType &type, casacore::CoordinateSystem &cSys, const casacore::String &xUnit, const casacore::String &doppler, casacore::uInt pixelAxis)
Helper function.
const SpectralList & getList(casacore::Bool fit=true) const
Recover the list of elements.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.