|
| 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 ®ion, const casacore::Record *const ®ionRec, 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::Bool > | converged () 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...
|
|
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 ®ion) |
|
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 > ¶mNames, const std::vector< casac::variant > ¶mValues) 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) |
|
|
virtual casacore::Bool | _hasLogfileSupport () const |
| by default, derived classes are configured to have no log file support. More...
|
|
virtual casacore::Bool | _supportsMultipleRegions () const |
|
| ImageTask (const SPCIIT image, const casacore::String ®ion, const casacore::Record *const ®ionPtr, 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 ®ionPtr, 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 |
|
|
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 > ¶meters, 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 > ¶meters, 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) |
|
template<class T>
class casa::ImageFitter< T >
Definition at line 38 of file ImageFitter.h.
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