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

Reweighter reweights a selected part of an casacore::MS based on the properties of a (possibly different) selection of it. More...

#include <Reweighter.h>

Public Member Functions

 Reweighter (const casacore::String &theMS, const casacore::Bool dorms=false, const casacore::uInt minsamp=1)
 
virtual ~Reweighter ()
 
casacore::Bool selectSpw (std::set< casacore::Int > &spwset, casacore::Vector< casacore::Int > &chanStartv, casacore::Vector< casacore::Int > &chanEndv, casacore::Vector< casacore::Int > &chanStepv, const casacore::String &spwstr)
 Select spw and channels for each spw in spwstr. More...
 
casacore::Bool selectCorrelations (const casacore::String &corrstr)
 Setup polarization selection (for now, only from available correlations - no casacore::Stokes transformations.) More...
 
casacore::Bool setmsselect (const casacore::String &fitspw="", const casacore::String &outspw="", const casacore::String &field="", const casacore::String &baseline="", const casacore::String &scan="", const casacore::String &subarray="", const casacore::String &correlation="", const casacore::String &intent="", const casacore::String &obs="")
 select stuff using msselection syntax...time is left out call it separately with timebin Returns a success value. More...
 
casacore::Bool selectSource (const casacore::Vector< casacore::Int > &fieldid)
 Select source or field. More...
 
void selectAntenna (const casacore::Vector< casacore::Int > &antennaids, const casacore::Vector< casacore::String > &antennaSel)
 
void selectArray (const casacore::String &subarray)
 Select array IDs to use. More...
 
void selectTime (casacore::Double timeBin=-1.0, casacore::String timerng="")
 select time parameters More...
 
void setFitSpw (const casacore::String &fitspw)
 void selectSource(casacore::Vector<casacore::String> sourceid); More...
 
void setOutSpw (const casacore::String &outspw)
 Set the selection string for output spws (not channels!). More...
 
casacore::Bool reweight (casacore::String &colname, const casacore::String &combine)
 Do the reweighting! More...
 

Static Public Member Functions

static casacore::Bool getCorrTypes (casacore::Vector< casacore::Int > &polIDs, casacore::Vector< casacore::Vector< casacore::Int > > &corrTypes, const casacore::MSColumns &msc)
 void verifyColumns(const casacore::MeasurementSet& ms, const casacore::Vector<casacore::MS::PredefinedColumns>& colNames); More...
 

Protected Member Functions

casacore::Bool makeSelection ()
 method that returns the selected ms (?! - but it's Boolean - RR) More...
 
const casacore::ArrayColumn
< casacore::Complex > & 
right_column (const casacore::ROMSColumns *ms_p, const casacore::MS::PredefinedColumns datacol)
 *** Private member functions *** More...
 
casacore::Bool setSortOrder (casacore::Block< casacore::Int > &sort, const casacore::String &uncombinable="", const casacore::Bool verbose=true) const
 Sets sort to a casacore::Block of columns that a VisibilityIterator should sort by, according to combine_p. More...
 
casacore::Bool shouldWatch (casacore::Bool &conflict, const casacore::String &col, const casacore::String &uncombinable="", const casacore::Bool verbose=true) const
 Returns whether col is (not in combine_p) || in uncombinable. More...
 
void makeUnionSpw ()
 
casacore::MS::PredefinedColumns dataColStrToEnum (const casacore::String &col)
 Defaults to DATA. More...
 

Protected Attributes

casacore::MeasurementSet ms_p
 *** Member variables *** More...
 
casacore::MeasurementSet mssel_p
 
casacore::Bool dorms_p
 
casacore::uInt minsamp_p
 
casacore::MSColumnsmsc_p
 
casacore::Bool antennaSel_p
 
casacore::Double timeBin_p
 
casacore::String scanString_p
 
casacore::String intentString_p
 
casacore::String obsString_p
 
casacore::String timeRange_p
 
casacore::String arrayExpr_p
 
casacore::String corrString_p
 
casacore::String combine_p
 
casacore::String fitspw_p
 scan #, observation, and/or state ID? Must be lowercase at all times. More...
 
casacore::String outspw_p
 
casacore::Vector< casacore::Intunionspw_p
 
casacore::Vector
< casacore::String
antennaSelStr_p
 Uninitialized by ctors. More...
 
casacore::Vector< casacore::IntantennaId_p
 
casacore::Vector< casacore::IntfieldId_p
 
casacore::Vector< casacore::IntpolIDs_p
 casacore::Map from DDID to polID, filled in getCorrTypes(). More...
 
casacore::Vector
< casacore::Vector
< casacore::Int > > 
corrTypes_p
 casacore::Map from polID to corrTypes, filled in getCorrTypes(). More...
 
casacore::Vector
< casacore::Vector
< casacore::Slice > > 
chanSlices_p
 
casacore::Vector< casacore::SlicecorrSlice_p
 
casacore::Vector
< casacore::Vector
< casacore::Slice > > 
corrSlices_p
 
casacore::Matrix
< casacore::Double
selTimeRanges_p
 
std::set< casacore::Intfitspwset_p
 
std::set< casacore::Intoutspwset_p
 
casacore::Vector< casacore::IntfitStart_p
 
casacore::Vector< casacore::IntfitEnd_p
 
casacore::Vector< casacore::IntfitStep_p
 

Detailed Description

Reweighter reweights a selected part of an casacore::MS based on the properties of a (possibly different) selection of it.

<visibility=export>

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Reweighter...it reweights.

Synopsis

The order of operations (as in ms::split()) is: ctor setmsselect selectTime makeReweighter

These forward declarations are so the corresponding.h files don't have to be included in this.h file, but it's only worth it if a lot of other files include this file.

Definition at line 86 of file Reweighter.h.

Constructor & Destructor Documentation

casa::Reweighter::Reweighter ( const casacore::String theMS,
const casacore::Bool  dorms = false,
const casacore::uInt  minsamp = 1 
)
virtual casa::Reweighter::~Reweighter ( )
virtual

Member Function Documentation

casacore::MS::PredefinedColumns casa::Reweighter::dataColStrToEnum ( const casacore::String col)
protected

Defaults to DATA.

static casacore::Bool casa::Reweighter::getCorrTypes ( casacore::Vector< casacore::Int > &  polIDs,
casacore::Vector< casacore::Vector< casacore::Int > > &  corrTypes,
const casacore::MSColumns msc 
)
static

void verifyColumns(const casacore::MeasurementSet& ms, const casacore::Vector<casacore::MS::PredefinedColumns>& colNames);

Fills polIDs with a map from DDID to polID, and corrTypes with a map from polID to corrTypes. The return value is meaningless for now.

casacore::Bool casa::Reweighter::makeSelection ( )
protected

method that returns the selected ms (?! - but it's Boolean - RR)

void casa::Reweighter::makeUnionSpw ( )
protected
casacore::Bool casa::Reweighter::reweight ( casacore::String colname,
const casacore::String combine 
)

Do the reweighting!

const casacore::ArrayColumn<casacore::Complex>& casa::Reweighter::right_column ( const casacore::ROMSColumns ms_p,
const casacore::MS::PredefinedColumns  datacol 
)
protected

*** Private member functions ***

Picks a reference to DATA, MODEL_DATA, CORRECTED_DATA, or LAG_DATA out of ms_p. FLOAT_DATA is not included because it is not natively complex.

void casa::Reweighter::selectAntenna ( const casacore::Vector< casacore::Int > &  antennaids,
const casacore::Vector< casacore::String > &  antennaSel 
)
inline

Definition at line 117 of file Reweighter.h.

References antennaId_p, antennaSel_p, antennaSelStr_p, and casa::SubMS::pickAntennas().

void casa::Reweighter::selectArray ( const casacore::String subarray)
inline

Select array IDs to use.

Definition at line 125 of file Reweighter.h.

References arrayExpr_p.

casacore::Bool casa::Reweighter::selectCorrelations ( const casacore::String corrstr)

Setup polarization selection (for now, only from available correlations - no casacore::Stokes transformations.)

casacore::Bool casa::Reweighter::selectSource ( const casacore::Vector< casacore::Int > &  fieldid)

Select source or field.

casacore::Bool casa::Reweighter::selectSpw ( std::set< casacore::Int > &  spwset,
casacore::Vector< casacore::Int > &  chanStartv,
casacore::Vector< casacore::Int > &  chanEndv,
casacore::Vector< casacore::Int > &  chanStepv,
const casacore::String spwstr 
)

Select spw and channels for each spw in spwstr.

Returns true on success and false on failure.

void casa::Reweighter::selectTime ( casacore::Double  timeBin = -1.0,
casacore::String  timerng = "" 
)

select time parameters

void casa::Reweighter::setFitSpw ( const casacore::String fitspw)
inline

void selectSource(casacore::Vector<casacore::String> sourceid);

Set the selection string for line-free channels.

Definition at line 133 of file Reweighter.h.

References fitspw_p.

casacore::Bool casa::Reweighter::setmsselect ( const casacore::String fitspw = "",
const casacore::String outspw = "",
const casacore::String field = "",
const casacore::String baseline = "",
const casacore::String scan = "",
const casacore::String subarray = "",
const casacore::String correlation = "",
const casacore::String intent = "",
const casacore::String obs = "" 
)

select stuff using msselection syntax...time is left out call it separately with timebin Returns a success value.

void casa::Reweighter::setOutSpw ( const casacore::String outspw)
inline

Set the selection string for output spws (not channels!).

Definition at line 135 of file Reweighter.h.

References outspw_p.

casacore::Bool casa::Reweighter::setSortOrder ( casacore::Block< casacore::Int > &  sort,
const casacore::String uncombinable = "",
const casacore::Bool  verbose = true 
) const
protected

Sets sort to a casacore::Block of columns that a VisibilityIterator should sort by, according to combine_p.

Columns that should never be combined in the calling function, i.e. spw for time averaging, should be listed in uncombinable.

verbose: log a message on error.

Returns whether or not there were any conflicts between combine_p and uncombinable.

casacore::Bool casa::Reweighter::shouldWatch ( casacore::Bool conflict,
const casacore::String col,
const casacore::String uncombinable = "",
const casacore::Bool  verbose = true 
) const
protected

Returns whether col is (not in combine_p) || in uncombinable.

Columns that should never be combined in the calling function, i.e. spw for time averaging, should be listed in uncombinable.

verbose: log a message on error.

conflict is set to true if there is a conflict between combine_p and uncombinable.

Member Data Documentation

casacore::Vector<casacore::Int> casa::Reweighter::antennaId_p
protected

Definition at line 214 of file Reweighter.h.

Referenced by selectAntenna().

casacore::Bool casa::Reweighter::antennaSel_p
protected

Definition at line 199 of file Reweighter.h.

Referenced by selectAntenna().

casacore::Vector<casacore::String> casa::Reweighter::antennaSelStr_p
protected

Uninitialized by ctors.

Definition at line 213 of file Reweighter.h.

Referenced by selectAntenna().

casacore::String casa::Reweighter::arrayExpr_p
protected

Definition at line 204 of file Reweighter.h.

Referenced by selectArray().

casacore::Vector<casacore::Vector<casacore::Slice> > casa::Reweighter::chanSlices_p
protected

Definition at line 224 of file Reweighter.h.

casacore::String casa::Reweighter::combine_p
protected

Definition at line 205 of file Reweighter.h.

casacore::Vector<casacore::Slice> casa::Reweighter::corrSlice_p
protected

Definition at line 225 of file Reweighter.h.

casacore::Vector<casacore::Vector<casacore::Slice> > casa::Reweighter::corrSlices_p
protected

Definition at line 226 of file Reweighter.h.

casacore::String casa::Reweighter::corrString_p
protected

Definition at line 204 of file Reweighter.h.

casacore::Vector<casacore::Vector<casacore::Int> > casa::Reweighter::corrTypes_p
protected

casacore::Map from polID to corrTypes, filled in getCorrTypes().

Definition at line 222 of file Reweighter.h.

casacore::Bool casa::Reweighter::dorms_p
protected

Definition at line 196 of file Reweighter.h.

casacore::Vector<casacore::Int> casa::Reweighter::fieldId_p
protected

Definition at line 216 of file Reweighter.h.

casacore::Vector<casacore::Int> casa::Reweighter::fitEnd_p
protected

Definition at line 230 of file Reweighter.h.

casacore::String casa::Reweighter::fitspw_p
protected

scan #, observation, and/or state ID? Must be lowercase at all times.

Definition at line 208 of file Reweighter.h.

Referenced by setFitSpw().

std::set<casacore::Int> casa::Reweighter::fitspwset_p
protected

Definition at line 229 of file Reweighter.h.

casacore::Vector<casacore::Int> casa::Reweighter::fitStart_p
protected

Definition at line 230 of file Reweighter.h.

casacore::Vector<casacore::Int> casa::Reweighter::fitStep_p
protected

Definition at line 230 of file Reweighter.h.

casacore::String casa::Reweighter::intentString_p
protected

Definition at line 201 of file Reweighter.h.

casacore::uInt casa::Reweighter::minsamp_p
protected

Definition at line 197 of file Reweighter.h.

casacore::MeasurementSet casa::Reweighter::ms_p
protected

*** Member variables ***

Initialized* by ctors. (Maintain order both here and in ctors.) not necessarily to anything useful.

Definition at line 195 of file Reweighter.h.

casacore::MSColumns* casa::Reweighter::msc_p
protected

Definition at line 198 of file Reweighter.h.

casacore::MeasurementSet casa::Reweighter::mssel_p
protected

Definition at line 195 of file Reweighter.h.

casacore::String casa::Reweighter::obsString_p
protected

Definition at line 201 of file Reweighter.h.

casacore::String casa::Reweighter::outspw_p
protected

Definition at line 209 of file Reweighter.h.

Referenced by setOutSpw().

std::set<casacore::Int> casa::Reweighter::outspwset_p
protected

Definition at line 229 of file Reweighter.h.

casacore::Vector<casacore::Int> casa::Reweighter::polIDs_p
protected

casacore::Map from DDID to polID, filled in getCorrTypes().

Definition at line 219 of file Reweighter.h.

casacore::String casa::Reweighter::scanString_p
protected

Definition at line 201 of file Reweighter.h.

casacore::Matrix<casacore::Double> casa::Reweighter::selTimeRanges_p
protected

Definition at line 227 of file Reweighter.h.

casacore::Double casa::Reweighter::timeBin_p
protected

Definition at line 200 of file Reweighter.h.

casacore::String casa::Reweighter::timeRange_p
protected

Definition at line 204 of file Reweighter.h.

casacore::Vector<casacore::Int> casa::Reweighter::unionspw_p
protected

Definition at line 210 of file Reweighter.h.


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