28 #ifndef IMAGEANALYSIS_IMAGEPROFILEFITTERRESULTS_H
29 #define IMAGEANALYSIS_IMAGEPROFILEFITTERRESULTS_H
40 class ProfileFitResults;
69 const casacore::Array<std::shared_ptr<ProfileFitResults> >*
const &fitters,
138 bool velocity,
bool wavelength
176 const std::shared_ptr<const casacore::SubImage<casacore::Float> >
_subImage;
183 std::shared_ptr<casacore::LogIO>
_log;
194 std::unique_ptr<std::vector<vector<casacore::Array<casacore::Double> > > >
_createPCFArrays()
const;
281 std::shared_ptr<const ProfileFitResults> fitter,
static const casacore::uInt _lsPlane
A Vector of integers, for indexing into Array<T> objects.
casacore::Array< casacore::String > _worldCoords
static const casacore::String _CONVERGED
ImageProfileFitterResults(const std::shared_ptr< casacore::LogIO > log, const casacore::CoordinateSystem &csysIm, const casacore::Array< std::shared_ptr< ProfileFitResults > > *const &fitters, const SpectralList &nonPolyEstimates, const std::shared_ptr< const casacore::SubImage< casacore::Float > > subImage, casacore::Int fitAxis, casacore::Int polyOrder, casacore::uInt nGaussSinglets, casacore::uInt nGaussMultiplets, casacore::uInt nLorentzSinglets, casacore::uInt nPLPCoeffs, casacore::uInt nLTPCoeffs, casacore::Bool logResults, casacore::Bool multiFit, const std::shared_ptr< LogFile > logfile, const casacore::String &xUnit, const casacore::String &summaryHeader)
static void _makeSolutionImages(const casacore::String &name, const casacore::CoordinateSystem &csys, const casacore::Array< casacore::Double > &values, const casacore::String &unit, const casacore::Array< casacore::Bool > &mask)
LatticeExprNode log(const LatticeExprNode &expr)
Describes a multiplet of Gaussian shaped spectral lines.
void _insertPCF(vector< vector< casacore::Array< casacore::Double > > > &pcfArrays, const casacore::IPosition &pixel, const PCFSpectralElement &pcf, const casacore::uInt row, const casacore::uInt col, const casacore::Double increment) const
void setAmpErrName(const casacore::String &s)
gaussian amplitude error image name
casacore::Bool _doVelocity
casacore::Vector< casacore::Double > _goodCenterRange
casacore::String _logTransPolyToString(const LogTransformedPolynomialSpectralElement <p) const
static const casacore::String _class
casacore::String _centerErrName
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
casacore::Record getResults() const
get the result Record
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
casacore::String _integralErrName
Describes a polynomial spectral profile.
~ImageProfileFitterResults()
static const casacore::String _VALID
casacore::String getClass() const
static casacore::Array< casacore::Bool > _replicateMask(const casacore::Array< casacore::Bool > &array, casacore::Int n)
the input array must have a degenerate last axis.
std::vector< String > logSummary(casacore::uInt nProfiles, casacore::uInt nAttempted, casacore::uInt nSucceeded, casacore::uInt nConverged, casacore::uInt nValid)
void setLTPErrName(const casacore::String &s)
set the name of the power logarithmic polynomial image.
casacore::String _ltpErrName
std::vector< axisType > _axisTypes
casacore::String _summaryHeader
static const casacore::String _SUCCEEDED
casacore::Vector< casacore::Double > _goodFWHMRange
casacore::String _ltpName
static const casacore::uInt _gsPlane
std::shared_ptr< LogFile > _logfile
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
void setFWHMErrName(const casacore::String &s)
gaussian fwhm error image name
void _doWorldCoords(casacore::Array< casacore::String > &directionInfo, const casacore::CoordinateSystem &csysSub, const casacore::IPosition &pixel, const casacore::DirectionCoordinate *const &dcoord, const casacore::SpectralCoordinate *const &spcoord, const casacore::StokesCoordinate *const &polcoord, casacore::Bool returnDirection, const casacore::String &directionType)
casacore::String _fwhmErrName
casacore::String _ampErrName
casacore::Bool _logResults
void _processSolutions(casacore::Array< casacore::String > &typeMat, casacore::Array< casacore::Int > &niterArr, casacore::Array< casacore::Int > &nCompArr, const casacore::IPosition &pixel, std::shared_ptr< const ProfileFitResults > fitter, std::unique_ptr< std::vector< vector< casacore::Array< casacore::Double > > > > &pcfArrays, std::vector< casacore::Array< casacore::Double > > &plpArrays, std::vector< casacore::Array< casacore::Double > > <pArrays, casacore::Double increment)
casacore::String _elementToString(const casacore::Double value, const casacore::Double error, const casacore::String &unit, casacore::Bool isFixed) const
void setFWHMName(const casacore::String &s)
gaussian fwhm image name
void createResults()
create all the products.
casacore::uInt _nLorentzSinglets
casacore::String _gaussianMultipletToString(const GaussianMultipletSpectralElement &gm, const casacore::CoordinateSystem &csys, const casacore::Vector< casacore::Double > &world, const casacore::IPosition &imPos) const
casacore::uInt _nGaussMultiplets
casacore::String _powerLogPolyToString(const PowerLogPolynomialSpectralElement &plp) const
casacore::Double _fitAxisIncrement() const
SpectralList _nonPolyEstimates
casacore::String _integralName
const casacore::Array< std::shared_ptr< ProfileFitResults > > *const _fitters
Interconvert pixel positions and directions (e.g. RA/DEC).
void setCenterErrName(const casacore::String &s)
gaussian center error image name
static const casacore::uInt _nOthers
const casacore::Vector< casacore::Double > getPixelCenter(uint index) const
Returns the center, in pixels of the indexth fit.
std::shared_ptr< casacore::LogIO > _log
Abstract base class that describes a spectral profile that can be parameterized by a peak value (ampl...
casacore::String _fwhmName
void setPLPDivisor(const casacore::String &x)
void _marshalFitResults(casacore::Array< casacore::Bool > &attemptedArr, casacore::Array< casacore::Bool > &successArr, casacore::Array< casacore::Bool > &convergedArr, casacore::Array< casacore::Bool > &validArr, casacore::Array< casacore::String > &typeMat, casacore::Array< casacore::Int > &niterArr, casacore::Array< casacore::Int > &nCompArr, std::unique_ptr< std::vector< vector< casacore::Array< casacore::Double > > > > &pcfArrays, std::vector< casacore::Array< casacore::Double > > &plpArrayss, std::vector< casacore::Array< casacore::Double > > <pArrays, casacore::Bool returnDirection, casacore::Array< casacore::String > &directionInfo)
casacore::String _plpErrName
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
casacore::uInt _nGaussSinglets
casacore::String _plpName
A (masked) subset of an ImageInterface object.
casacore::Double getWorldValue(double pixelVal, const casacore::IPosition &imPos, const casacore::String &units, bool velocity, bool wavelength) const
Converts a pixel value into a world value either in velocity, wavelength, or frequency units...
casacore::String _getTag(const casacore::uInt i) const
template <class T, class U> class vector;
const casacore::Array< ImageFit1D< casacore::Float > > & getFitters() const
void _writeImages(const casacore::CoordinateSystem &csys, const casacore::Array< casacore::Bool > &mask, const casacore::String &yUnit) const
const std::shared_ptr< const casacore::SubImage< casacore::Float > > _subImage
subimage contains the region of the original image on which the fit is performed. ...
void setIntegralErrName(const casacore::String &s)
gaussian integral error image name
casacore::Double _centerWorld(const PCFSpectralElement &solution, const casacore::IPosition &imPos) const
void setPLPErrName(const casacore::String &s)
set the name of the power logarithmic polynomial image.
void _writeLogfile(const casacore::String &str, casacore::Bool open, casacore::Bool close)
Interconvert pixel and frequency values.
casacore::Record _results
casacore::Vector< casacore::Vector< casacore::Double > > _pixelPositions
casacore::Bool _inVelocitySpace() const;
casacore::String _pcfToString(const PCFSpectralElement *const &pcf, const casacore::CoordinateSystem &csys, const casacore::Vector< casacore::Double > &world, const casacore::IPosition &imPos, casacore::Bool showTypeString=true, const casacore::String &indent="") const
casacore::uInt _nPLPCoeffs
A set of SpectralElements.
void setCenterName(const casacore::String &s)
gaussian center image name
Interconvert between pixel and Stokes value.
casacore::Bool _setAxisTypes()
casacore::String _ampName
String: the storage and methods of handling collections of characters.
const casacore::CoordinateSystem _csysIm
casacore::String _plpDivisor
void setLTPName(const casacore::String &s)
set the name of the power logarithmic polynomial image.
void setPLPName(const casacore::String &s)
set the name of the power logarithmic polynomial image.
Describes the function most often used for determining spectral index plus higher order terms: y = c_...
std::unique_ptr< std::vector< vector< casacore::Array< casacore::Double > > > > _createPCFArrays() const
casacore::uInt _nLTPCoeffs
casacore::String _polynomialToString(const PolynomialSpectralElement &poly, const casacore::CoordinateSystem &csys, const casacore::Vector< casacore::Double > &imPix, const casacore::Vector< casacore::Double > &world) const
casacore::String _centerName
casacore::Vector< casacore::Double > _goodAmpRange
void setAmpName(const casacore::String &s)
gaussian amplitude image name
Interconvert pixel and world coordinates.
void setIntegralName(const casacore::String &s)
gaussian integral image name
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
void writeImages(casacore::Bool someConverged) const
void setLogResults(const casacore::Bool logResults)
stream results to logger? This can be a lot of output.