26 #ifndef IMAGEANALYSIS_IMAGEFITTER_H
27 #define IMAGEANALYSIS_IMAGEFITTER_H
115 std::pair<ComponentList, ComponentList>
fit();
146 std::vector<casacore::Double>& solution, std::vector<casacore::Double>& error
211 std::vector<std::shared_ptr<casacore::Vector<casacore::Double>>>
283 std::pair<casacore::Int, casacore::Int>& pixelOffsets,
314 std::pair<casacore::Int, casacore::Int>& pixelOffsets,
354 #ifndef AIPS_NO_TEMPLATE_SRC
355 #include <imageanalysis/ImageAnalysis/ImageFitter.tcc>
A Vector of integers, for indexing into Array<T> objects.
casacore::String _regionString
std::vector< casacore::Double > _zeroLevelOffsetSolution
std::vector< casacore::Double > _allBeamsSter
casacore::Vector< casacore::Double > _singleParameterEstimate(casacore::Fit2D &fitter, casacore::Fit2D::Types model, const casacore::MaskedArray< T > &pixels, T minVal, T maxVal, const casacore::IPosition &minPos, const casacore::IPosition &maxPos) const
casacore::Double _getStatistic(const casacore::String &type, const casacore::uInt index, const casacore::Record &stats) const
std::vector< casacore::Quantity > _minorAxisErrors
std::vector< casacore::Bool > _isPoint
Temporary astronomical images.
ComponentList _curConvolvedList
std::vector< casacore::Quantity > _allConvolvedPeakIntensities
std::vector< casacore::Quantity > _fluxDensities
std::vector< casacore::Quantity > _majorAxisErrors
casacore::Int _chanPixNumber
static const casacore::String _class
ImageFitter()=delete
Top level interface to ImageAnalysis::fitsky to handle inputs, bookkeeping etc and ultimately call fi...
void getZeroLevelSolution(std::vector< casacore::Double > &solution, std::vector< casacore::Double > &error)
get the fitted result and error.
std::vector< casacore::Quantity > _allConvolvedPeakIntensityErrors
void setModel(const casacore::String &m)
set the output model image name
Shape
The shapes of all the components.
casacore::String _newEstimatesFileName
casacore::String _sizeToString(const casacore::uInt compNumber) const
summarize the size details in a nicely formatted string
virtual Type type()
Return the type enum.
casacore::Double _getRMS() const
std::vector< casacore::Quantity > _peakIntensityErrors
void _getStandardDeviations(casacore::Double &inputStdDev, casacore::Double &residStdDev) const
casacore::Bool _zeroLevelIsFixed
casacore::String _spectrumToString(casacore::uInt compNumber) const
ComponentList _curDeconvolvedList
casacore::String _resultsToString(casacore::uInt nPixels)
summarize the results in a nicely formatted string
void _getRMSs(casacore::Double &inputRMS, casacore::Double &residRMS) const
void _fitsky(casacore::Fit2D &fitter, casacore::Array< T > &pixels, casacore::Array< casacore::Bool > &pixelMask, casacore::Bool &converged, casacore::Double &zeroLevelOffsetSolution, casacore::Double &zeroLevelOffsetError, std::pair< casacore::Int, casacore::Int > &pixelOffsets, const casacore::Vector< casacore::String > &models, casacore::Bool fitIt, casacore::Bool deconvolveIt, casacore::Double zeroLevelEstimate)
casacore::Bool _doZeroLevel
void setSummaryFile(const casacore::String &f)
Set The summary text file name.
std::shared_ptr< std::pair< T, T > > _excludePixelRange
casacore::String _kludgedStokes
casacore::Vector< casacore::String > _deconvolvedMessages
virtual casacore::Bool _supportsMultipleRegions() const
casacore::Vector< casacore::String > _fixed
ComponentType::Shape _convertModelType(casacore::Fit2D::Types typeIn) const
std::vector< casacore::Quantity > _fluxDensityErrors
std::vector< casacore::Quantity > _minorAxes
Represents a Gaussian restoring beam associated with an image.
casacore::Vector< casacore::Bool > _fitConverged
StokesTypes
The Stokes types are defined by this enum.
std::vector< casacore::Quantity > _allSums
virtual ~ImageFitter()
destructor
casacore::Vector< casacore::uInt > _chanVec
Class for masking an Array for operations on that Array.
void _setSum(const SkyComponent &comp, const casacore::SubImage< T > &im, casacore::uInt compNum)
casacore::GaussianBeam _getCurrentBeam() const
std::vector< casacore::Coordinate::Type > _getNecessaryCoordinates() const
Represents the minimum set of coordinates necessary for the task to function.
void setExcludePixelRange(const std::pair< T, T > &r)
void _fitLoop(casacore::Bool &anyConverged, ComponentList &convolvedList, ComponentList &deconvolvedList, SPIIT templateImage, SPIIT residualImage, SPIIT modelImage, casacore::String &resultsString)
casacore::String _statisticsToString() const
void _finishConstruction(const casacore::String &estimatesFilename)
std::vector< casacore::Double > _zeroLevelOffsetError
std::vector< std::shared_ptr< casacore::Vector< casacore::Double > > > _pixelCoords
void setRMS(const casacore::Quantity &rms)
set rms level for calculating uncertainties.
void _setBeam(casacore::GaussianBeam &beam, casacore::uInt ngauss)
std::vector< casacore::Quantity > _peakIntensities
casacore::Record getOutputRecord() const
The casacore::Record holding all the output info.
Types
Enum describing the different models you can fit.
std::vector< casacore::Quantity > _allFluxDensityErrors
casacore::String _summary
void setIncludePixelRange(const std::pair< T, T > &r)
casacore::Record _residStats
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
casacore::Quantity _pixelWidth()
std::vector< casacore::Quantity > _allFluxDensities
void _encodeSkyComponentError(SkyComponent &sky, casacore::Double facToJy, const casacore::CoordinateSystem &csys, const casacore::Vector< casacore::Double > ¶meters, const casacore::Vector< casacore::Double > &errors, casacore::Stokes::StokesTypes stokes, casacore::Bool xIsLong) const
void setZeroLevelEstimate(casacore::Double estimate, casacore::Bool isFixed)
set the zero level estimate.
void _doConverged(ComponentList &convolvedList, ComponentList &deconvolvedList, casacore::Double &zeroLevelOffsetEstimate, std::pair< casacore::Int, casacore::Int > &pixelOffsets, SPIIT &residualImage, SPIIT &modelImage, std::shared_ptr< casacore::TempImage< T >> &tImage, std::shared_ptr< casacore::ArrayLattice< casacore::Bool > > &initMask, casacore::Double zeroLevelOffsetSolution, casacore::Double zeroLevelOffsetError, casacore::Bool hasSpectralAxis, casacore::Int spectralAxisNumber, casacore::Bool outputImages, const casacore::IPosition &planeShape, const casacore::Array< T > &pixels, const casacore::Array< casacore::Bool > &pixelMask, const casacore::Fit2D &fitter)
std::shared_ptr< std::pair< T, T > > _includePixelRange
std::pair< ComponentList, ComponentList > fit()
Do the fit.
void setResidual(const casacore::String &r)
set the output residual image name
casacore::Record inputStats
void _fitskyExtractBeam(casacore::Vector< casacore::Double > ¶meters, const casacore::ImageInfo &imageInfo, const casacore::Bool xIsLong, const casacore::CoordinateSystem &cSys) const
casacore::Vector< casacore::Bool > converged() const
Did the fit converge? Throw casacore::AipsError if the fit has not yet been done. ...
std::vector< casacore::uInt > _allChanNums
A (masked) subset of an ImageInterface object.
ImageFitterResults< T > _results
virtual casacore::Bool _hasLogfileSupport() const
by default, derived classes are configured to have no log file support.
template <class T, class U> class vector;
casacore::String _estimatesString
Fit 2-D objects to 2-D Lattices or Arrays.
casacore::Double _correlatedOverallSNR(casacore::uInt comp, casacore::Double a, casacore::Double b, casacore::Double signalToNoise) const
std::unique_ptr< casacore::Quantity > _noiseFWHM
casacore::String getClass() const
std::vector< OutputDestinationChecker::OutputStruct > _getOutputStruct()
void setWriteControl(typename ImageFitterResults< T >::CompListWriteControl x)
void _writeCompList(ComponentList &list) const
A class for manipulating groups of components.
std::vector< casacore::Quantity > _majorAxes
TableExprNode rms(const TableExprNode &array)
casacore::Bool _useBeamForNoise
void setNoiseFWHM(const casacore::Quantity &q)
set noise correlation beam FWHM
A component of a model of the sky.
void unsetZeroLevelEstimate()
Unset zero level (resets to zero).
casacore::String _compListName
casacore::Bool _correlatedNoise
ImageFitterResults< T >::CompListWriteControl _writeControl
void _setDeconvolvedSizes()
String: the storage and methods of handling collections of characters.
std::vector< casacore::GaussianBeam > _allBeams
casacore::Quantity _pixWidth
casacore::String _residual
std::vector< casacore::Double > _allBeamsPix
casacore::Int _stokesPixNumber
A memory resident Lattice.
std::vector< casacore::Quantity > _positionAngles
Miscellaneous information related to an image.
casacore::Double _zeroLevelOffsetEstimate
std::vector< casacore::Quantity > _positionAngleErrors
void clearNoiseFWHM()
clear noise FWHM, if the image has no beam, use the uncorrelated noise equations. ...
void _setIncludeExclude(casacore::Fit2D &fitter) const
SPIIT _createImageTemplate() const
Interconvert pixel and world coordinates.
CasacRegionManager::StokesControl _getStokesControl() const
void _createOutputRecord(const ComponentList &convolved, const ComponentList &decon)
CompListWriteControl
Used exclusively by ImageFitter. Unless you are modifying that class, you should have no reason to us...