casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
casa::Reweighter Class Reference

#include <Reweighter.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 82 of file Reweighter.h.


Constructor & Destructor Documentation

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

Member Function Documentation

Defaults to DATA.

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

void verifyColumns(const MeasurementSet& ms, const Vector<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.

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

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

Do the reweighting!

const ROArrayColumn<Complex>& casa::Reweighter::right_column ( const ROMSColumns ms_p,
const 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 Vector< Int > &  antennaids,
const Vector< String > &  antennaSel 
) [inline]

Definition at line 113 of file Reweighter.h.

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

void casa::Reweighter::selectArray ( const String subarray) [inline]

Select array IDs to use.

Definition at line 121 of file Reweighter.h.

References arrayExpr_p.

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

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

Select source or field.

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

Select spw and channels for each spw in spwstr.

Returns true on success and false on failure.

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

select time parameters

void casa::Reweighter::setFitSpw ( const String fitspw) [inline]

void selectSource(Vector<String> sourceid);

Set the selection string for line-free channels.

Definition at line 129 of file Reweighter.h.

References fitspw_p.

Bool casa::Reweighter::setmsselect ( const String fitspw = "",
const String outspw = "",
const String field = "",
const String baseline = "",
const String scan = "",
const String subarray = "",
const String correlation = "",
const String intent = "",
const 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 String outspw) [inline]

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

Definition at line 131 of file Reweighter.h.

References outspw_p.

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

Sets sort to a 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.

Bool casa::Reweighter::shouldWatch ( Bool conflict,
const String col,
const String uncombinable = "",
const 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

Definition at line 210 of file Reweighter.h.

Referenced by selectAntenna().

Definition at line 195 of file Reweighter.h.

Referenced by selectAntenna().

Uninitialized by ctors.

Definition at line 209 of file Reweighter.h.

Referenced by selectAntenna().

Definition at line 200 of file Reweighter.h.

Referenced by selectArray().

Definition at line 220 of file Reweighter.h.

Definition at line 201 of file Reweighter.h.

Definition at line 221 of file Reweighter.h.

Definition at line 222 of file Reweighter.h.

Definition at line 200 of file Reweighter.h.

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

Definition at line 218 of file Reweighter.h.

Definition at line 192 of file Reweighter.h.

Definition at line 212 of file Reweighter.h.

Definition at line 226 of file Reweighter.h.

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

Definition at line 204 of file Reweighter.h.

Referenced by setFitSpw().

std::set<Int> casa::Reweighter::fitspwset_p [protected]

Definition at line 225 of file Reweighter.h.

Definition at line 226 of file Reweighter.h.

Definition at line 226 of file Reweighter.h.

Definition at line 197 of file Reweighter.h.

Definition at line 193 of file Reweighter.h.

*** Member variables ***

 Initialized* by ctors.  (Maintain order both here and in ctors.)

not necessarily to anything useful.

Definition at line 191 of file Reweighter.h.

Definition at line 194 of file Reweighter.h.

Definition at line 191 of file Reweighter.h.

Definition at line 197 of file Reweighter.h.

Definition at line 205 of file Reweighter.h.

Referenced by setOutSpw().

std::set<Int> casa::Reweighter::outspwset_p [protected]

Definition at line 225 of file Reweighter.h.

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

Definition at line 215 of file Reweighter.h.

Definition at line 197 of file Reweighter.h.

Definition at line 223 of file Reweighter.h.

Definition at line 196 of file Reweighter.h.

Definition at line 200 of file Reweighter.h.

Definition at line 206 of file Reweighter.h.


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