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

#include <SpectralCollapser.h>

Public Types

enum  CollapseType {
  PMEAN,
  PMEDIAN,
  PSUM,
  CUNKNOWN
}
 Class to collapse an image along the spectral axis. More...
 
enum  CollapseError {
  PNOERROR,
  PERMSE,
  PPROPAG,
  EUNKNOWN
}
 

Public Member Functions

 SpectralCollapser (const SPCIIF image)
 Constructor. More...
 
 SpectralCollapser (const SPCIIF image, const casacore::String storePath)
 Constructor. More...
 
virtual ~SpectralCollapser ()
 Destructor. More...
 
virtual casacore::Bool collapse (const casacore::Vector< casacore::Float > &specVals, const casacore::Float startVal, const casacore::Float endVal, const casacore::String &unit, const SpectralCollapser::CollapseType &collType, const SpectralCollapser::CollapseError &collError, casacore::String &outname, casacore::String &msg)
 Parameters: specVals - the vector of spectral values startVal - the spectral value to start the collapse endVal - the spectral value to end the collapse unit - the unit of the spectral values collType - the collapse type (e.g. More...
 
casacore::String summaryHeader () const
 
void collapseTypeToVector (const SpectralCollapser::CollapseType &collType, casacore::Vector< casacore::Int > &momentVec)
 

Static Public Member Functions

static void stringToCollapseType (const casacore::String &text, SpectralCollapser::CollapseType &collType)
 Convert from string to collapse type. More...
 
static void stringToCollapseError (const casacore::String &text, SpectralCollapser::CollapseError &collError)
 Convert from string to error type. More...
 
static void collapseTypeToString (const SpectralCollapser::CollapseType &collType, casacore::String &strCollType)
 Convert from collapse type to string. More...
 
static void collapseErrorToString (const SpectralCollapser::CollapseError &collError, casacore::String &strCollError)
 Convert from error type to string. More...
 

Private Member Functions

 SpectralCollapser ()
 Disallow default constructor. More...
 
void _setUp ()
 
casacore::Bool _cleanTmpData (const casacore::String &tmpFileName) const
 
casacore::Bool _cleanTmpData (const casacore::String &tmpData, const casacore::String &tmpError) const
 
casacore::Bool _getQualitySubImg (const casacore::ImageInterface< casacore::Float > *image, const casacore::Bool &data, casacore::SubImage< casacore::Float > &qualitySub)
 
casacore::Bool _getQualitySubImgs (SPCIIF image, std::shared_ptr< casacore::SubImage< casacore::Float > > &subData, std::shared_ptr< casacore::SubImage< casacore::Float > > &subError) const
 
casacore::Bool _getOutputName (const casacore::String &wcsInp, casacore::String &outImg, casacore::String &outImgData, casacore::String &outImgError) const
 
casacore::Bool _collapse (const SPCIIF image, const casacore::String &aggString, const casacore::String &chanInp, const casacore::String &outname) const
 
casacore::Bool _moments (const casacore::ImageInterface< casacore::Float > *image, const casacore::Vector< casacore::Int > &momentVec, const casacore::Int &startIndex, const casacore::Int &endIndex, const casacore::String &outname)
 
casacore::Bool _mergeDataError (const casacore::String &outImg, const casacore::String &dataImg, const casacore::String &errorImg, const casacore::Float &normError=1.0) const
 
void _addMiscInfo (const casacore::String &outName, const casacore::String &wcsInput, const casacore::String &chanInput, const SpectralCollapser::CollapseType &collType, const SpectralCollapser::CollapseError &collError) const
 
void _collTypeToImCollString (const SpectralCollapser::CollapseType &collType, casacore::String &colType) const
 
void _collErrorToImCollString (const SpectralCollapser::CollapseError &collError, casacore::String &colError) const
 

Private Attributes

SPCIIF _image
 
casacore::LogIO_log
 
casacore::String _storePath
 
casacore::String _all
 
casacore::IPosition _specAxis
 
casacore::Bool _hasQualAxis
 

Detailed Description

Definition at line 43 of file SpectralCollapser.h.

Member Enumeration Documentation

Enumerator
PNOERROR 
PERMSE 
PPROPAG 
EUNKNOWN 

Definition at line 76 of file SpectralCollapser.h.

Class to collapse an image along the spectral axis.

Prerequisite

Etymology

Collapses an image along the spectral axis

Synopsis

Helper class to collapse an image along the spectral axis. The spectral range to combine is provided interactively from the profiler. The class transforms the range to the channels to be combined. The actual image\ combination is then done with the class "ImageCollapser".The different collapse types

Enumerator
PMEAN 
PMEDIAN 
PSUM 
CUNKNOWN 

PVRMSE,.

Definition at line 68 of file SpectralCollapser.h.

Constructor & Destructor Documentation

casa::SpectralCollapser::SpectralCollapser ( const SPCIIF  image)

Constructor.

casa::SpectralCollapser::SpectralCollapser ( const SPCIIF  image,
const casacore::String  storePath 
)

Constructor.

virtual casa::SpectralCollapser::~SpectralCollapser ( )
virtual

Destructor.

casa::SpectralCollapser::SpectralCollapser ( )
private

Disallow default constructor.

Member Function Documentation

void casa::SpectralCollapser::_addMiscInfo ( const casacore::String outName,
const casacore::String wcsInput,
const casacore::String chanInput,
const SpectralCollapser::CollapseType collType,
const SpectralCollapser::CollapseError collError 
) const
private
casacore::Bool casa::SpectralCollapser::_cleanTmpData ( const casacore::String tmpFileName) const
private
casacore::Bool casa::SpectralCollapser::_cleanTmpData ( const casacore::String tmpData,
const casacore::String tmpError 
) const
private
casacore::Bool casa::SpectralCollapser::_collapse ( const SPCIIF  image,
const casacore::String aggString,
const casacore::String chanInp,
const casacore::String outname 
) const
private
void casa::SpectralCollapser::_collErrorToImCollString ( const SpectralCollapser::CollapseError collError,
casacore::String colError 
) const
private
void casa::SpectralCollapser::_collTypeToImCollString ( const SpectralCollapser::CollapseType collType,
casacore::String colType 
) const
private
casacore::Bool casa::SpectralCollapser::_getOutputName ( const casacore::String wcsInp,
casacore::String outImg,
casacore::String outImgData,
casacore::String outImgError 
) const
private
casacore::Bool casa::SpectralCollapser::_getQualitySubImg ( const casacore::ImageInterface< casacore::Float > *  image,
const casacore::Bool data,
casacore::SubImage< casacore::Float > &  qualitySub 
)
private
casacore::Bool casa::SpectralCollapser::_getQualitySubImgs ( SPCIIF  image,
std::shared_ptr< casacore::SubImage< casacore::Float > > &  subData,
std::shared_ptr< casacore::SubImage< casacore::Float > > &  subError 
) const
private
casacore::Bool casa::SpectralCollapser::_mergeDataError ( const casacore::String outImg,
const casacore::String dataImg,
const casacore::String errorImg,
const casacore::Float normError = 1.0 
) const
private
casacore::Bool casa::SpectralCollapser::_moments ( const casacore::ImageInterface< casacore::Float > *  image,
const casacore::Vector< casacore::Int > &  momentVec,
const casacore::Int startIndex,
const casacore::Int endIndex,
const casacore::String outname 
)
private
void casa::SpectralCollapser::_setUp ( )
private
virtual casacore::Bool casa::SpectralCollapser::collapse ( const casacore::Vector< casacore::Float > &  specVals,
const casacore::Float  startVal,
const casacore::Float  endVal,
const casacore::String unit,
const SpectralCollapser::CollapseType collType,
const SpectralCollapser::CollapseError collError,
casacore::String outname,
casacore::String msg 
)
virtual

Parameters: specVals - the vector of spectral values startVal - the spectral value to start the collapse endVal - the spectral value to end the collapse unit - the unit of the spectral values collType - the collapse type (e.g.

"mean" or "median") collError - information on what the error outname - name of the collapsed image (output) msg - message string (output)

static void casa::SpectralCollapser::collapseErrorToString ( const SpectralCollapser::CollapseError collError,
casacore::String strCollError 
)
static

Convert from error type to string.

static void casa::SpectralCollapser::collapseTypeToString ( const SpectralCollapser::CollapseType collType,
casacore::String strCollType 
)
static

Convert from collapse type to string.

void casa::SpectralCollapser::collapseTypeToVector ( const SpectralCollapser::CollapseType collType,
casacore::Vector< casacore::Int > &  momentVec 
)
static void casa::SpectralCollapser::stringToCollapseError ( const casacore::String text,
SpectralCollapser::CollapseError collError 
)
static

Convert from string to error type.

static void casa::SpectralCollapser::stringToCollapseType ( const casacore::String text,
SpectralCollapser::CollapseType collType 
)
static

Convert from string to collapse type.

casacore::String casa::SpectralCollapser::summaryHeader ( ) const

Member Data Documentation

casacore::String casa::SpectralCollapser::_all
private

Definition at line 125 of file SpectralCollapser.h.

casacore::Bool casa::SpectralCollapser::_hasQualAxis
private

Definition at line 127 of file SpectralCollapser.h.

SPCIIF casa::SpectralCollapser::_image
private

Definition at line 121 of file SpectralCollapser.h.

casacore::LogIO* casa::SpectralCollapser::_log
private

Definition at line 122 of file SpectralCollapser.h.

casacore::IPosition casa::SpectralCollapser::_specAxis
private

Definition at line 126 of file SpectralCollapser.h.

casacore::String casa::SpectralCollapser::_storePath
private

Definition at line 124 of file SpectralCollapser.h.


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