casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casa::SideBandSeparatorBase Class Referenceabstract

The base class of side band separation algorithm using FFT. More...

#include <SideBandSeparator.h>

Inheritance diagram for casa::SideBandSeparatorBase:
casa::SideBandSeparatorII

Public Member Functions

 SideBandSeparatorBase (const std::vector< std::string > &inputname)
 The constructor. More...
 
virtual ~SideBandSeparatorBase ()
 The destructor. More...
 
void setShift (const std::vector< double > &shift, const bool signal=true)
 Set the number of channels shifted in each input data. More...
 
void setThreshold (const double limit)
 Set rejection limit of solution. More...
 
void solveBoth (const bool flag)
 Resolve both image and signal sideband when true is set. More...
 
void solvefromOther (const bool flag)
 Obtain spectra by subtracting the solution of the other sideband. More...
 
virtual void separate (const std::string &outfile, const bool overwrite)=0
 invoke sideband separation More...
 

Protected Member Functions

void init ()
 Initialize member variables. More...
 
void initshift ()
 
void setInput (const std::vector< std::string > &inputname)
 
casacore::Bool checkFile (const std::string name, std::string type="")
 Return if the path exists (optionally, check file type) More...
 
casacore::Vector< float > solve (const casacore::Matrix< float > &specMat, const std::vector< casacore::uInt > &inIdvec, const bool signal=true)
 
casacore::Vector< bool > collapseMask (const casacore::Matrix< bool > &flagMat, const std::vector< casacore::uInt > &inIdvec, const bool signal=true)
 
void shiftSpectrum (const casacore::Vector< float > &invec, double shift, casacore::Vector< float > &outvec)
 
void shiftFlag (const casacore::Vector< bool > &invec, double shift, casacore::Vector< bool > &outvec)
 
void deconvolve (casacore::Matrix< float > &specmat, const std::vector< double > shiftvec, const double threshold, casacore::Matrix< float > &outmat)
 
void aggregateMat (const casacore::Matrix< float > &inmat, std::vector< float > &outvec)
 
void subtractFromOther (const casacore::Matrix< float > &shiftmat, const std::vector< float > &invec, const std::vector< double > &shift, std::vector< float > &outvec)
 
*size_t setupShift ()
 
bool interpolateMaskedChannels (casacore::Array< float > spectrum, const casacore::Array< bool > maskp)
 

Protected Attributes

std::vector< std::string > inputNames_
 Member variables. More...
 
std::vector< double > sigShift_
 frequency and direction setup to select data. More...
 
std::vector< double > imgShift_
 
unsigned int nshift_
 
unsigned int nchan_
 
bool otherside_
 solution parameters More...
 
bool doboth_
 
double rejlimit_
 
casacore::FFTServer
< casacore::Float,
casacore::Complex > 
fftsf
 
casacore::FFTServer
< casacore::Float,
casacore::Complex > 
fftsi
 

Detailed Description

The base class of side band separation algorithm using FFT.

Data model independent functions are defined. Data model dependent functions should be defined in derived class.

Definition at line 35 of file SideBandSeparator.h.

Constructor & Destructor Documentation

casa::SideBandSeparatorBase::SideBandSeparatorBase ( const std::vector< std::string > &  inputname)

The constructor.

Parameters
[in]inputnameA vector of file names of input data
virtual casa::SideBandSeparatorBase::~SideBandSeparatorBase ( )
virtual

The destructor.

Member Function Documentation

void casa::SideBandSeparatorBase::aggregateMat ( const casacore::Matrix< float > &  inmat,
std::vector< float > &  outvec 
)
protected
casacore::Bool casa::SideBandSeparatorBase::checkFile ( const std::string  name,
std::string  type = "" 
)
protected

Return if the path exists (optionally, check file type)

casacore::Vector<bool> casa::SideBandSeparatorBase::collapseMask ( const casacore::Matrix< bool > &  flagMat,
const std::vector< casacore::uInt > &  inIdvec,
const bool  signal = true 
)
protected
void casa::SideBandSeparatorBase::deconvolve ( casacore::Matrix< float > &  specmat,
const std::vector< double >  shiftvec,
const double  threshold,
casacore::Matrix< float > &  outmat 
)
protected
void casa::SideBandSeparatorBase::init ( )
protected

Initialize member variables.

void casa::SideBandSeparatorBase::initshift ( )
protected
bool casa::SideBandSeparatorBase::interpolateMaskedChannels ( casacore::Array< float >  spectrum,
const casacore::Array< bool >  maskp 
)
protected
virtual void casa::SideBandSeparatorBase::separate ( const std::string &  outfile,
const bool  overwrite 
)
pure virtual

invoke sideband separation

The function should be defined in derived class.

Parameters
[in]outfilethe prefix of output file names. Suffixes which indicates sideband, i.e., 'signalband' and 'imageband', are added to outfile .
[in]overwriteif true overwrite existing output files. if false, an error is raised if an output file already exists.

Implemented in casa::SideBandSeparatorII.

void casa::SideBandSeparatorBase::setInput ( const std::vector< std::string > &  inputname)
protected
void casa::SideBandSeparatorBase::setShift ( const std::vector< double > &  shift,
const bool  signal = true 
)

Set the number of channels shifted in each input data.

Parameters
[in]shiftThe number of channels shifted in each input data. The number of elements must be equal to the number of input data.
[in]signalIf true, the shift is interpreted as that of signal sideband. If false, image sideband is assumed.
void casa::SideBandSeparatorBase::setThreshold ( const double  limit)

Set rejection limit of solution.

Parameters
[in]limitRejection limit of channels with poor solution.
* size_t casa::SideBandSeparatorBase::setupShift ( )
protected
void casa::SideBandSeparatorBase::shiftFlag ( const casacore::Vector< bool > &  invec,
double  shift,
casacore::Vector< bool > &  outvec 
)
protected
void casa::SideBandSeparatorBase::shiftSpectrum ( const casacore::Vector< float > &  invec,
double  shift,
casacore::Vector< float > &  outvec 
)
protected
casacore::Vector<float> casa::SideBandSeparatorBase::solve ( const casacore::Matrix< float > &  specMat,
const std::vector< casacore::uInt > &  inIdvec,
const bool  signal = true 
)
protected
void casa::SideBandSeparatorBase::solveBoth ( const bool  flag)
inline

Resolve both image and signal sideband when true is set.

Parameters
[in]flagif true, both singnal and image sidebands are solved. If false, sideband suppression is invoked and only signal sideband is solved.

Definition at line 74 of file SideBandSeparator.h.

References doboth_.

void casa::SideBandSeparatorBase::solvefromOther ( const bool  flag)
inline

Obtain spectra by subtracting the solution of the other sideband.

This is an experimental feature to investigate the algorithm.

Parameters
[in]flagif false, the solution of its own sideband is adopted. if true, the solution is obtained for the other sideband and subtracted from an average of observed spectrum.

Definition at line 85 of file SideBandSeparator.h.

References otherside_.

void casa::SideBandSeparatorBase::subtractFromOther ( const casacore::Matrix< float > &  shiftmat,
const std::vector< float > &  invec,
const std::vector< double > &  shift,
std::vector< float > &  outvec 
)
protected

Member Data Documentation

bool casa::SideBandSeparatorBase::doboth_
protected

Definition at line 160 of file SideBandSeparator.h.

Referenced by solveBoth().

casacore::FFTServer<casacore::Float, casacore::Complex> casa::SideBandSeparatorBase::fftsf
protected

Definition at line 163 of file SideBandSeparator.h.

casacore::FFTServer<casacore::Float, casacore::Complex> casa::SideBandSeparatorBase::fftsi
protected

Definition at line 163 of file SideBandSeparator.h.

std::vector<double> casa::SideBandSeparatorBase::imgShift_
protected

Definition at line 157 of file SideBandSeparator.h.

std::vector<std::string> casa::SideBandSeparatorBase::inputNames_
protected

Member variables.

name of images

Definition at line 155 of file SideBandSeparator.h.

unsigned int casa::SideBandSeparatorBase::nchan_
protected

Definition at line 158 of file SideBandSeparator.h.

unsigned int casa::SideBandSeparatorBase::nshift_
protected

Definition at line 158 of file SideBandSeparator.h.

bool casa::SideBandSeparatorBase::otherside_
protected

solution parameters

Definition at line 160 of file SideBandSeparator.h.

Referenced by solvefromOther().

double casa::SideBandSeparatorBase::rejlimit_
protected

Definition at line 161 of file SideBandSeparator.h.

std::vector<double> casa::SideBandSeparatorBase::sigShift_
protected

frequency and direction setup to select data.

Definition at line 157 of file SideBandSeparator.h.


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