casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
casa::ImageFitter< T > Class Template Reference

#include <ImageFitter.h>

Inheritance diagram for casa::ImageFitter< T >:
casa::ImageTask< T >

Public Member Functions

 ImageFitter ()=delete
 Top level interface to ImageAnalysis::fitsky to handle inputs, bookkeeping etc and ultimately call fitsky to do fitting. More...
 
 ImageFitter (const SPCIIT image, const casacore::String &region, const casacore::Record *const &regionRec, const casacore::String &box="", const casacore::String &chanInp="", const casacore::String &stokes="", const casacore::String &maskInp="", const casacore::String &estiamtesFilename="", const casacore::String &newEstimatesInp="", const casacore::String &compListName="")
 constructor appropriate for API calls. More...
 
 ImageFitter (const ImageFitter &other)=delete
 
virtual ~ImageFitter ()
 destructor More...
 
std::pair< ComponentList,
ComponentList
fit ()
 Do the fit. More...
 
void setWriteControl (typename ImageFitterResults< T >::CompListWriteControl x)
 
casacore::String getClass () const
 
casacore::Bool converged (casacore::uInt plane) const
 Did the fit converge for the specified channel? Throw casacore::AipsError if the fit has not yet been done. More...
 
casacore::Vector< casacore::Boolconverged () const
 Did the fit converge? Throw casacore::AipsError if the fit has not yet been done. More...
 
void setZeroLevelEstimate (casacore::Double estimate, casacore::Bool isFixed)
 set the zero level estimate. More...
 
void unsetZeroLevelEstimate ()
 Unset zero level (resets to zero). More...
 
void getZeroLevelSolution (std::vector< casacore::Double > &solution, std::vector< casacore::Double > &error)
 get the fitted result and error. More...
 
void setRMS (const casacore::Quantity &rms)
 set rms level for calculating uncertainties. More...
 
void setIncludePixelRange (const std::pair< T, T > &r)
 
void setExcludePixelRange (const std::pair< T, T > &r)
 
void setModel (const casacore::String &m)
 set the output model image name More...
 
void setResidual (const casacore::String &r)
 set the output residual image name More...
 
void setNoiseFWHM (const casacore::Quantity &q)
 set noise correlation beam FWHM More...
 
void setNoiseFWHM (casacore::Double d)
 in pixel widths More...
 
void clearNoiseFWHM ()
 clear noise FWHM, if the image has no beam, use the uncorrelated noise equations. More...
 
casacore::Record getOutputRecord () const
 The casacore::Record holding all the output info. More...
 
void setSummaryFile (const casacore::String &f)
 Set The summary text file name. More...
 
- Public Member Functions inherited from casa::ImageTask< T >
virtual ~ImageTask ()
 
void setStretch (const casacore::Bool stretch)
 
void setLogfile (const casacore::String &lf)
 tacitly does nothing if lf is the empty string. More...
 
void setLogfileAppend (const casacore::Bool a)
 
void setRegion (const casacore::Record &region)
 
void setMask (const casacore::String &mask)
 
void setVerbosity (Verbosity verbosity)
 
void addHistory (const std::vector< std::pair< casacore::String, casacore::String > > &msgs) const
 These messages will appear in the product image history upon the call to _prepareOutputImage(). More...
 
void addHistory (const casacore::LogOrigin &origin, const casacore::String &msg) const
 
void addHistory (const casacore::LogOrigin &origin, const std::vector< casacore::String > &msgs) const
 
void addHistory (const casacore::LogOrigin &origin, const casacore::String &taskname, const std::vector< casacore::String > &paramNames, const std::vector< casac::variant > &paramValues) const
 This adds standard history messages regarding the task that was run and input parameters used. More...
 
void suppressHistoryWriting (casacore::Bool b)
 suppress writing the history on _prepareOutputImage() call. More...
 
std::vector< std::pair
< casacore::String,
casacore::String > > 
getHistory ()
 get the history associated with the task. More...
 
void setDropDegen (casacore::Bool d)
 

Protected Member Functions

virtual casacore::Bool _hasLogfileSupport () const
 by default, derived classes are configured to have no log file support. More...
 
virtual casacore::Bool _supportsMultipleRegions () const
 
- Protected Member Functions inherited from casa::ImageTask< T >
 ImageTask (const SPCIIT image, const casacore::String &region, const casacore::Record *const &regionPtr, const casacore::String &box, const casacore::String &chanInp, const casacore::String &stokes, const casacore::String &maskInp, const casacore::String &outname, casacore::Bool overwrite)
 if outname is empty, no image will be written if overwrite is True, if image already exists it will be removed if overwrite is False, if image already exists exception will be thrown More...
 
 ImageTask (const SPCIIT image, const casacore::Record *const &regionPtr, const casacore::String &mask, const casacore::String &outname, casacore::Bool overwrite)
 
virtual void _construct (casacore::Bool verbose=true)
 does the lion's share of constructing the object, ie checks validity of inputs, etc. More...
 
const SPCIIT _getImage () const
 
const casacore::String_getMask () const
 
const casacore::Record_getRegion () const
 
void _setStokes (const casacore::String &stokes)
 
const casacore::String_getStokes () const
 
const casacore::String_getChans () const
 
const casacore::String_getOutname () const
 
casacore::Bool _isPVImage () const
 Is the attached image a position-velocity (PV) image? More...
 
void _removeExistingOutfileIfNecessary () const
 
void _removeExistingFileIfNecessary (const casacore::String &filename, const casacore::Bool overwrite, casacore::Bool warnOnly=false) const
 if warnOnly is true, log a warning message if file exists and overwrite is true, else throw an exception. More...
 
casacore::String _summaryHeader () const
 
const std::shared_ptr
< casacore::LogIO
_getLog () const
 
casacore::Bool _getStretch () const
 
Bool _getSuppressHistory () const
 
const std::shared_ptr< LogFile_getLogFile () const
 
casacore::Bool _writeLogfile (const casacore::String &output, const casacore::Bool open=true, const casacore::Bool close=true)
 
casacore::Bool _openLogfile ()
 
void _closeLogfile () const
 
virtual casacore::Bool _supportsMultipleBeams () const
 does this task support images with multiple beams? false means it never does. More...
 
SPIIT _prepareOutputImage (const casacore::ImageInterface< T > &image, const casacore::Array< T > *const values, const casacore::ArrayLattice< casacore::Bool > *const mask=nullptr, const casacore::IPosition *const outShape=nullptr, const casacore::CoordinateSystem *const coordsys=nullptr, const casacore::String *const outname=nullptr, casacore::Bool overwrite=false, casacore::Bool dropDegen=false) const
 If outname != NULL, use the value supplied. More...
 
SPIIT _prepareOutputImage (const casacore::ImageInterface< T > &image, casacore::Bool dropDegen=false) const
 
SPIIT _prepareOutputImage (const casacore::ImageInterface< T > &image, const casacore::String &outname, casacore::Bool overwrite, casacore::Bool warnOnly) const
 if warnOnly is true, only log a warning message if the file exists and overwrite is true, else throw an excepction More...
 
SPIIT _prepareOutputImage (const casacore::ImageInterface< T > &image, const casacore::Lattice< T > &data) const
 data are copied to the output image from the data lattice. More...
 
Verbosity _getVerbosity () const
 
casacore::Bool _getOverwrite () const
 
virtual casacore::Bool _mustHaveSquareDirectionPixels () const
 
casacore::Bool _getDropDegen () const
 
template<class U >
void _doHistory (std::shared_ptr< casacore::ImageInterface< U >> &image) const
 
void _reportOldNewImageShapes (const ImageInterface< T > &out) const
 
void _reportOldNewImageShapes (const IPosition &outShape) const
 

Private Types

using Angular2DGaussian = casacore::GaussianBeam
 

Private Member Functions

void _fitLoop (casacore::Bool &anyConverged, ComponentList &convolvedList, ComponentList &deconvolvedList, SPIIT templateImage, SPIIT residualImage, SPIIT modelImage, casacore::String &resultsString)
 
std::vector
< OutputDestinationChecker::OutputStruct
_getOutputStruct ()
 
std::vector
< casacore::Coordinate::Type
_getNecessaryCoordinates () const
 Represents the minimum set of coordinates necessary for the task to function. More...
 
CasacRegionManager::StokesControl _getStokesControl () const
 
void _finishConstruction (const casacore::String &estimatesFilename)
 
casacore::String _resultsToString (casacore::uInt nPixels)
 summarize the results in a nicely formatted string More...
 
casacore::String _sizeToString (const casacore::uInt compNumber) const
 summarize the size details in a nicely formatted string More...
 
casacore::String _spectrumToString (casacore::uInt compNumber) const
 
void _setDeconvolvedSizes ()
 
void _getStandardDeviations (casacore::Double &inputStdDev, casacore::Double &residStdDev) const
 
void _getRMSs (casacore::Double &inputRMS, casacore::Double &residRMS) const
 
casacore::Double _getStatistic (const casacore::String &type, const casacore::uInt index, const casacore::Record &stats) const
 
casacore::String _statisticsToString () const
 
SPIIT _createImageTemplate () const
 
void _writeCompList (ComponentList &list) const
 
void _setIncludeExclude (casacore::Fit2D &fitter) 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::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
 
ComponentType::Shape _convertModelType (casacore::Fit2D::Types typeIn) const
 
void _fitskyExtractBeam (casacore::Vector< casacore::Double > &parameters, const casacore::ImageInfo &imageInfo, const casacore::Bool xIsLong, const casacore::CoordinateSystem &cSys) const
 
void _encodeSkyComponentError (SkyComponent &sky, casacore::Double facToJy, const casacore::CoordinateSystem &csys, const casacore::Vector< casacore::Double > &parameters, const casacore::Vector< casacore::Double > &errors, casacore::Stokes::StokesTypes stokes, casacore::Bool xIsLong) const
 
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)
 
casacore::Quantity _pixelWidth ()
 
void _calculateErrors ()
 
casacore::Double _getRMS () const
 
casacore::Double _correlatedOverallSNR (casacore::uInt comp, casacore::Double a, casacore::Double b, casacore::Double signalToNoise) const
 
casacore::GaussianBeam _getCurrentBeam () const
 
void _createOutputRecord (const ComponentList &convolved, const ComponentList &decon)
 
void _setSum (const SkyComponent &comp, const casacore::SubImage< T > &im, casacore::uInt compNum)
 
void _setBeam (casacore::GaussianBeam &beam, casacore::uInt ngauss)
 

Private Attributes

casacore::String _regionString
 
casacore::String _residual
 
casacore::String _model
 
casacore::String _estimatesString
 
casacore::String _summary
 
casacore::String _newEstimatesFileName
 
casacore::String _compListName
 
casacore::String _bUnit
 
std::shared_ptr< std::pair< T,
T > > 
_includePixelRange
 
std::shared_ptr< std::pair< T,
T > > 
_excludePixelRange
 
ComponentList _estimates
 
ComponentList _curConvolvedList
 
ComponentList _curDeconvolvedList
 
casacore::Vector
< casacore::String
_fixed
 
casacore::Vector
< casacore::String
_deconvolvedMessages
 
casacore::Bool _fitDone
 
casacore::Bool _noBeam
 
casacore::Bool _doZeroLevel
 
casacore::Bool _zeroLevelIsFixed
 
casacore::Bool _correlatedNoise
 
casacore::Bool _useBeamForNoise
 
casacore::Vector< casacore::Bool_fitConverged
 
std::vector< casacore::Quantity_peakIntensities
 
std::vector< casacore::Quantity_peakIntensityErrors
 
std::vector< casacore::Quantity_fluxDensityErrors
 
std::vector< casacore::Quantity_fluxDensities
 
std::vector< casacore::Quantity_majorAxes
 
std::vector< casacore::Quantity_majorAxisErrors
 
std::vector< casacore::Quantity_minorAxes
 
std::vector< casacore::Quantity_minorAxisErrors
 
std::vector< casacore::Quantity_positionAngles
 
std::vector< casacore::Quantity_positionAngleErrors
 
std::vector< casacore::Quantity_allConvolvedPeakIntensities
 
std::vector< casacore::Quantity_allConvolvedPeakIntensityErrors
 
std::vector< casacore::Quantity_allSums
 
std::vector< casacore::Quantity_allFluxDensities
 
std::vector< casacore::Quantity_allFluxDensityErrors
 
std::vector< std::shared_ptr
< casacore::Vector
< casacore::Double > > > 
_pixelCoords
 
std::vector
< casacore::GaussianBeam
_allBeams
 
std::vector< casacore::Double_allBeamsPix
 
std::vector< casacore::Double_allBeamsSter
 
std::vector< casacore::uInt_allChanNums
 
std::vector< casacore::Bool_isPoint
 
casacore::Record _residStats
 
casacore::Record inputStats
 
casacore::Record _output
 
casacore::Double _rms
 
casacore::String _kludgedStokes
 
ImageFitterResults< T >
::CompListWriteControl 
_writeControl
 
casacore::Vector< casacore::uInt_chanVec
 
casacore::uInt _curChan
 
casacore::Double _zeroLevelOffsetEstimate
 
std::vector< casacore::Double_zeroLevelOffsetSolution
 
std::vector< casacore::Double_zeroLevelOffsetError
 
casacore::Int _stokesPixNumber
 
casacore::Int _chanPixNumber
 
ImageFitterResults< T > _results
 
std::unique_ptr
< casacore::Quantity
_noiseFWHM
 
casacore::Quantity _pixWidth
 

Static Private Attributes

static const casacore::String _class
 

Additional Inherited Members

- Public Types inherited from casa::ImageTask< T >
enum  Verbosity {
  QUIET,
  WHISPER,
  LOW,
  NORMAL,
  HIGH,
  NOISY,
  DEAFENING
}
 Virtual base class for image analysis tasks. More...
 
- Static Protected Member Functions inherited from casa::ImageTask< T >
static void _copyMask (casacore::Lattice< casacore::Bool > &mask, const casacore::ImageInterface< T > &image)
 
static void _copyData (casacore::Lattice< T > &data, const casacore::Lattice< T > &image)
 

Detailed Description

template<class T>
class casa::ImageFitter< T >

Definition at line 38 of file ImageFitter.h.

Member Typedef Documentation

template<class T >
using casa::ImageFitter< T >::Angular2DGaussian = casacore::GaussianBeam
private

Definition at line 193 of file ImageFitter.h.

Constructor & Destructor Documentation

template<class T >
casa::ImageFitter< T >::ImageFitter ( )
delete

Top level interface to ImageAnalysis::fitsky to handle inputs, bookkeeping etc and ultimately call fitsky to do fitting.

Etymology

Fits components to sources in images (ImageSourceComponentFitter was deemed to be to long of a name)

Synopsis

ImageFitter is the top level interface for fitting image source components. It handles most of the inputs, bookkeeping etc. It can be instantiated and its one public method, fit, run from either a C++ app or python.

Example

ImageFitter fitter(...)
fitter.fit()
template<class T >
casa::ImageFitter< T >::ImageFitter ( const SPCIIT  image,
const casacore::String region,
const casacore::Record *const &  regionRec,
const casacore::String box = "",
const casacore::String chanInp = "",
const casacore::String stokes = "",
const casacore::String maskInp = "",
const casacore::String estiamtesFilename = "",
const casacore::String newEstimatesInp = "",
const casacore::String compListName = "" 
)

constructor appropriate for API calls.

Parameters:

  • imagename - the name of the input image in which to fit the models
  • box - A 2-D rectangular box in which to use pixels for the fitting, eg box=100,120,200,230 In cases where both box and region are specified, box, not region, is used.
  • region - Named region to use for fitting
  • regionPtr - A pointer to a region. Note there are unfortunately several different types of region records throughout CASA. In this case, it must be a casacore::Record produced by creating a region via a casacore::RegionManager method.
  • chanInp - Zero-based channel number on which to do the fit. Only a single channel can be specified.
  • stokes - casacore::Stokes plane on which to do the fit. Only a single casacore::Stokes parameter can be specified.
  • maskInp - Mask (as LEL) to use as a way to specify which pixels to use
  • includepix - Pixel value range to include in the fit. includepix and excludepix cannot be specified simultaneously.
  • excludepix - Pixel value range to exclude from fit
  • residualInp - Name of residual image to save. Blank means do not save residual image
  • modelInp - Name of the model image to save. Blank means do not save model image

    use these constructors when you already have a pointer to a valid casacore::ImageInterface object

template<class T >
casa::ImageFitter< T >::ImageFitter ( const ImageFitter< T > &  other)
delete
template<class T >
virtual casa::ImageFitter< T >::~ImageFitter ( )
virtual

destructor

Member Function Documentation

template<class T >
void casa::ImageFitter< T >::_calculateErrors ( )
private
template<class T >
ComponentType::Shape casa::ImageFitter< T >::_convertModelType ( casacore::Fit2D::Types  typeIn) const
private
template<class T >
casacore::Double casa::ImageFitter< T >::_correlatedOverallSNR ( casacore::uInt  comp,
casacore::Double  a,
casacore::Double  b,
casacore::Double  signalToNoise 
) const
private
template<class T >
SPIIT casa::ImageFitter< T >::_createImageTemplate ( ) const
private
template<class T >
void casa::ImageFitter< T >::_createOutputRecord ( const ComponentList convolved,
const ComponentList decon 
)
private
template<class T >
void casa::ImageFitter< T >::_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 
)
private
template<class T >
void casa::ImageFitter< T >::_encodeSkyComponentError ( SkyComponent sky,
casacore::Double  facToJy,
const casacore::CoordinateSystem csys,
const casacore::Vector< casacore::Double > &  parameters,
const casacore::Vector< casacore::Double > &  errors,
casacore::Stokes::StokesTypes  stokes,
casacore::Bool  xIsLong 
) const
private
template<class T >
void casa::ImageFitter< T >::_finishConstruction ( const casacore::String estimatesFilename)
private
template<class T >
void casa::ImageFitter< T >::_fitLoop ( casacore::Bool anyConverged,
ComponentList convolvedList,
ComponentList deconvolvedList,
SPIIT  templateImage,
SPIIT  residualImage,
SPIIT  modelImage,
casacore::String resultsString 
)
private
template<class T >
void casa::ImageFitter< T >::_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 
)
private
template<class T >
void casa::ImageFitter< T >::_fitskyExtractBeam ( casacore::Vector< casacore::Double > &  parameters,
const casacore::ImageInfo imageInfo,
const casacore::Bool  xIsLong,
const casacore::CoordinateSystem cSys 
) const
private
template<class T >
casacore::GaussianBeam casa::ImageFitter< T >::_getCurrentBeam ( ) const
private
template<class T >
std::vector<casacore::Coordinate::Type> casa::ImageFitter< T >::_getNecessaryCoordinates ( ) const
privatevirtual

Represents the minimum set of coordinates necessary for the task to function.

Implements casa::ImageTask< T >.

template<class T >
std::vector<OutputDestinationChecker::OutputStruct> casa::ImageFitter< T >::_getOutputStruct ( )
privatevirtual

Reimplemented from casa::ImageTask< T >.

template<class T >
casacore::Double casa::ImageFitter< T >::_getRMS ( ) const
private
template<class T >
void casa::ImageFitter< T >::_getRMSs ( casacore::Double inputRMS,
casacore::Double residRMS 
) const
private
template<class T >
void casa::ImageFitter< T >::_getStandardDeviations ( casacore::Double inputStdDev,
casacore::Double residStdDev 
) const
private
template<class T >
casacore::Double casa::ImageFitter< T >::_getStatistic ( const casacore::String type,
const casacore::uInt  index,
const casacore::Record stats 
) const
private
template<class T >
CasacRegionManager::StokesControl casa::ImageFitter< T >::_getStokesControl ( ) const
privatevirtual

Implements casa::ImageTask< T >.

template<class T >
virtual casacore::Bool casa::ImageFitter< T >::_hasLogfileSupport ( ) const
inlineprotectedvirtual

by default, derived classes are configured to have no log file support.

Reimplemented from casa::ImageTask< T >.

Definition at line 185 of file ImageFitter.h.

template<class T >
casacore::Quantity casa::ImageFitter< T >::_pixelWidth ( )
private
template<class T >
casacore::String casa::ImageFitter< T >::_resultsToString ( casacore::uInt  nPixels)
private

summarize the results in a nicely formatted string

template<class T >
void casa::ImageFitter< T >::_setBeam ( casacore::GaussianBeam beam,
casacore::uInt  ngauss 
)
private
template<class T >
void casa::ImageFitter< T >::_setDeconvolvedSizes ( )
private
template<class T >
void casa::ImageFitter< T >::_setIncludeExclude ( casacore::Fit2D fitter) const
private
template<class T >
void casa::ImageFitter< T >::_setSum ( const SkyComponent comp,
const casacore::SubImage< T > &  im,
casacore::uInt  compNum 
)
private
template<class T >
casacore::Vector<casacore::Double> casa::ImageFitter< T >::_singleParameterEstimate ( casacore::Fit2D fitter,
casacore::Fit2D::Types  model,
const casacore::MaskedArray< T > &  pixels,
minVal,
maxVal,
const casacore::IPosition minPos,
const casacore::IPosition maxPos 
) const
private
template<class T >
casacore::String casa::ImageFitter< T >::_sizeToString ( const casacore::uInt  compNumber) const
private

summarize the size details in a nicely formatted string

template<class T >
casacore::String casa::ImageFitter< T >::_spectrumToString ( casacore::uInt  compNumber) const
private
template<class T >
casacore::String casa::ImageFitter< T >::_statisticsToString ( ) const
private
template<class T >
virtual casacore::Bool casa::ImageFitter< T >::_supportsMultipleRegions ( ) const
inlineprotectedvirtual

Reimplemented from casa::ImageTask< T >.

Definition at line 187 of file ImageFitter.h.

template<class T >
void casa::ImageFitter< T >::_writeCompList ( ComponentList list) const
private
template<class T >
void casa::ImageFitter< T >::clearNoiseFWHM ( )

clear noise FWHM, if the image has no beam, use the uncorrelated noise equations.

If the image has a beam(s) use the correlated noise equations with theta_N = the geometric mean of the beam major and minor axes.

template<class T >
casacore::Bool casa::ImageFitter< T >::converged ( casacore::uInt  plane) const

Did the fit converge for the specified channel? Throw casacore::AipsError if the fit has not yet been done.

plane is relative to the first plane in the image chosen to be fit.

template<class T >
casacore::Vector<casacore::Bool> casa::ImageFitter< T >::converged ( ) const

Did the fit converge? Throw casacore::AipsError if the fit has not yet been done.

plane is relative to the first plane in the image chosen to be fit.

template<class T >
std::pair<ComponentList, ComponentList> casa::ImageFitter< T >::fit ( )

Do the fit.

If componentList is specified, store the fitted components in that object. The first list in the returned pair represents the convolved components. The second list represents the deconvolved components. If the image has no beam, the two lists will be the same.

template<class T >
casacore::String casa::ImageFitter< T >::getClass ( ) const
inlinevirtual

Implements casa::ImageTask< T >.

Definition at line 121 of file ImageFitter.h.

References casa::ImageFitter< T >::_class.

template<class T >
casacore::Record casa::ImageFitter< T >::getOutputRecord ( ) const
inline

The casacore::Record holding all the output info.

Definition at line 178 of file ImageFitter.h.

References casa::ImageFitter< T >::_output.

template<class T >
void casa::ImageFitter< T >::getZeroLevelSolution ( std::vector< casacore::Double > &  solution,
std::vector< casacore::Double > &  error 
)

get the fitted result and error.

Throws an exception if the zero level was not fit for.

template<class T >
void casa::ImageFitter< T >::setExcludePixelRange ( const std::pair< T, T > &  r)
inline

Definition at line 156 of file ImageFitter.h.

References casa::ImageFitter< T >::_excludePixelRange.

template<class T >
void casa::ImageFitter< T >::setIncludePixelRange ( const std::pair< T, T > &  r)
inline

Definition at line 152 of file ImageFitter.h.

References casa::ImageFitter< T >::_includePixelRange.

template<class T >
void casa::ImageFitter< T >::setModel ( const casacore::String m)
inline

set the output model image name

Definition at line 161 of file ImageFitter.h.

References casa::ImageFitter< T >::_model.

template<class T >
void casa::ImageFitter< T >::setNoiseFWHM ( const casacore::Quantity q)

set noise correlation beam FWHM

template<class T >
void casa::ImageFitter< T >::setNoiseFWHM ( casacore::Double  d)

in pixel widths

template<class T >
void casa::ImageFitter< T >::setResidual ( const casacore::String r)
inline

set the output residual image name

Definition at line 164 of file ImageFitter.h.

References casa::ImageFitter< T >::_residual.

template<class T >
void casa::ImageFitter< T >::setRMS ( const casacore::Quantity rms)

set rms level for calculating uncertainties.

If not positive, an exception is thrown.

template<class T >
void casa::ImageFitter< T >::setSummaryFile ( const casacore::String f)
inline

Set The summary text file name.

Definition at line 181 of file ImageFitter.h.

References casa::ImageFitter< T >::_summary.

template<class T >
void casa::ImageFitter< T >::setWriteControl ( typename ImageFitterResults< T >::CompListWriteControl  x)
inline

Definition at line 117 of file ImageFitter.h.

References casa::ImageFitter< T >::_writeControl.

template<class T >
void casa::ImageFitter< T >::setZeroLevelEstimate ( casacore::Double  estimate,
casacore::Bool  isFixed 
)

set the zero level estimate.

Implies fitting of zero level should be done. Must be called before fit() to have an effect.

template<class T >
void casa::ImageFitter< T >::unsetZeroLevelEstimate ( )

Unset zero level (resets to zero).

Implies fitting of zero level should not be done. Call prior to fit().

Member Data Documentation

template<class T >
std::vector<casacore::GaussianBeam> casa::ImageFitter< T >::_allBeams
private

Definition at line 213 of file ImageFitter.h.

template<class T >
std::vector<casacore::Double> casa::ImageFitter< T >::_allBeamsPix
private

Definition at line 214 of file ImageFitter.h.

template<class T >
std::vector<casacore::Double> casa::ImageFitter< T >::_allBeamsSter
private

Definition at line 214 of file ImageFitter.h.

template<class T >
std::vector<casacore::uInt> casa::ImageFitter< T >::_allChanNums
private

Definition at line 215 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_allConvolvedPeakIntensities
private

Definition at line 208 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_allConvolvedPeakIntensityErrors
private

Definition at line 209 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_allFluxDensities
private

Definition at line 209 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_allFluxDensityErrors
private

Definition at line 210 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_allSums
private

Definition at line 209 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_bUnit
private

Definition at line 197 of file ImageFitter.h.

template<class T >
casacore::Int casa::ImageFitter< T >::_chanPixNumber
private

Definition at line 228 of file ImageFitter.h.

template<class T >
casacore::Vector<casacore::uInt> casa::ImageFitter< T >::_chanVec
private

Definition at line 223 of file ImageFitter.h.

template<class T >
const casacore::String casa::ImageFitter< T >::_class
staticprivate

Definition at line 233 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::getClass().

template<class T >
casacore::String casa::ImageFitter< T >::_compListName
private

Definition at line 197 of file ImageFitter.h.

template<class T >
casacore::Bool casa::ImageFitter< T >::_correlatedNoise
private

Definition at line 202 of file ImageFitter.h.

template<class T >
casacore::uInt casa::ImageFitter< T >::_curChan
private

Definition at line 224 of file ImageFitter.h.

template<class T >
ComponentList casa::ImageFitter< T >::_curConvolvedList
private

Definition at line 199 of file ImageFitter.h.

template<class T >
ComponentList casa::ImageFitter< T >::_curDeconvolvedList
private

Definition at line 199 of file ImageFitter.h.

template<class T >
casacore::Vector<casacore::String> casa::ImageFitter< T >::_deconvolvedMessages
private

Definition at line 200 of file ImageFitter.h.

template<class T >
casacore::Bool casa::ImageFitter< T >::_doZeroLevel
private

Definition at line 201 of file ImageFitter.h.

template<class T >
ComponentList casa::ImageFitter< T >::_estimates
private

Definition at line 199 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_estimatesString
private

Definition at line 196 of file ImageFitter.h.

template<class T >
std::shared_ptr<std::pair<T, T> > casa::ImageFitter< T >::_excludePixelRange
private

Definition at line 198 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::setExcludePixelRange().

template<class T >
casacore::Vector<casacore::Bool> casa::ImageFitter< T >::_fitConverged
private

Definition at line 203 of file ImageFitter.h.

template<class T >
casacore::Bool casa::ImageFitter< T >::_fitDone
private

Definition at line 201 of file ImageFitter.h.

template<class T >
casacore::Vector<casacore::String> casa::ImageFitter< T >::_fixed
private

Definition at line 200 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_fluxDensities
private

Definition at line 205 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_fluxDensityErrors
private

Definition at line 205 of file ImageFitter.h.

template<class T >
std::shared_ptr<std::pair<T, T> > casa::ImageFitter< T >::_includePixelRange
private

Definition at line 198 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::setIncludePixelRange().

template<class T >
std::vector<casacore::Bool> casa::ImageFitter< T >::_isPoint
private

Definition at line 216 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_kludgedStokes
private

Definition at line 219 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_majorAxes
private

Definition at line 205 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_majorAxisErrors
private

Definition at line 206 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_minorAxes
private

Definition at line 206 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_minorAxisErrors
private

Definition at line 206 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_model
private

Definition at line 196 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::setModel().

template<class T >
casacore::String casa::ImageFitter< T >::_newEstimatesFileName
private

Definition at line 197 of file ImageFitter.h.

template<class T >
casacore::Bool casa::ImageFitter< T >::_noBeam
private

Definition at line 201 of file ImageFitter.h.

template<class T >
std::unique_ptr<casacore::Quantity> casa::ImageFitter< T >::_noiseFWHM
private

Definition at line 230 of file ImageFitter.h.

template<class T >
casacore::Record casa::ImageFitter< T >::_output
private

Definition at line 217 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::getOutputRecord().

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_peakIntensities
private

Definition at line 204 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_peakIntensityErrors
private

Definition at line 204 of file ImageFitter.h.

template<class T >
std::vector<std::shared_ptr<casacore::Vector<casacore::Double> > > casa::ImageFitter< T >::_pixelCoords
private

Definition at line 212 of file ImageFitter.h.

template<class T >
casacore::Quantity casa::ImageFitter< T >::_pixWidth
private

Definition at line 231 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_positionAngleErrors
private

Definition at line 207 of file ImageFitter.h.

template<class T >
std::vector<casacore::Quantity> casa::ImageFitter< T >::_positionAngles
private

Definition at line 206 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_regionString
private

Definition at line 195 of file ImageFitter.h.

template<class T >
casacore::Record casa::ImageFitter< T >::_residStats
private

Definition at line 217 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_residual
private

Definition at line 196 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::setResidual().

template<class T >
ImageFitterResults<T> casa::ImageFitter< T >::_results
private

Definition at line 229 of file ImageFitter.h.

template<class T >
casacore::Double casa::ImageFitter< T >::_rms
private

Definition at line 218 of file ImageFitter.h.

template<class T >
casacore::Int casa::ImageFitter< T >::_stokesPixNumber
private

Definition at line 228 of file ImageFitter.h.

template<class T >
casacore::String casa::ImageFitter< T >::_summary
private

Definition at line 196 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::setSummaryFile().

template<class T >
casacore::Bool casa::ImageFitter< T >::_useBeamForNoise
private

Definition at line 202 of file ImageFitter.h.

template<class T >
ImageFitterResults<T>::CompListWriteControl casa::ImageFitter< T >::_writeControl
private

Definition at line 220 of file ImageFitter.h.

Referenced by casa::ImageFitter< T >::setWriteControl().

template<class T >
casacore::Bool casa::ImageFitter< T >::_zeroLevelIsFixed
private

Definition at line 202 of file ImageFitter.h.

template<class T >
std::vector<casacore::Double> casa::ImageFitter< T >::_zeroLevelOffsetError
private

Definition at line 226 of file ImageFitter.h.

template<class T >
casacore::Double casa::ImageFitter< T >::_zeroLevelOffsetEstimate
private

Definition at line 225 of file ImageFitter.h.

template<class T >
std::vector<casacore::Double> casa::ImageFitter< T >::_zeroLevelOffsetSolution
private

Definition at line 226 of file ImageFitter.h.

template<class T >
casacore::Record casa::ImageFitter< T >::inputStats
private

Definition at line 217 of file ImageFitter.h.


The documentation for this class was generated from the following file: