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 | Protected Member Functions | Protected Attributes | List of all members
casa::MSTransformDataHandler Class Reference

MSTransformDataHandler definition. More...

#include <MSTransformDataHandler.h>

Public Types

enum  asdmStManUseAlternatives {
  DONT,
  USE_FOR_DATA,
  USE_FOR_DATA_WEIGHT_SIGMA_FLAG
}
 

Public Member Functions

 MSTransformDataHandler (const casacore::String &theMS, casacore::Table::TableOption option, casacore::Bool virtualModelCol=false, casacore::Bool virtualCorrectedCol=false, casacore::Bool reindex=true)
 
 MSTransformDataHandler (const casacore::MeasurementSet &ms, casacore::Bool virtualModelCol=false, casacore::Bool virtualCorrectedCol=false, casacore::Bool reindex=true)
 
 ~MSTransformDataHandler ()
 
casacore::Bool setmsselect (const casacore::String &spw="", const casacore::String &field="", const casacore::String &baseline="", const casacore::String &scan="", const casacore::String &uvrange="", const casacore::String &taql="", const casacore::Vector< casacore::Int > &step=casacore::Vector< casacore::Int >(1, 1), const casacore::String &subarray="", const casacore::String &correlation="", const casacore::String &intent="", const casacore::String &obs="", const casacore::String &feed="")
 Selection method using msselection syntax. More...
 
casacore::Bool selectSource (const casacore::Vector< casacore::Int > &fieldid)
 Select source or field. More...
 
casacore::Bool selectSpw (const casacore::String &spwstr, const casacore::Vector< casacore::Int > &steps)
 Select spw and channels for each spw. More...
 
void selectAntenna (const casacore::Vector< casacore::Int > &antennaids, const casacore::Vector< casacore::String > &antennaSel)
 Select Antennas to split out. More...
 
void selectArray (const casacore::String &subarray)
 Select array IDs to use. More...
 
casacore::Bool selectCorrelations (const casacore::String &corrstr)
 Setup polarization selection (for now, only from available correlations - no casacore::Stokes transformations.) More...
 
void selectTime (casacore::Double timeBin=-1.0, casacore::String timerng="")
 Select time parameters. More...
 
casacore::Bool makeMSBasicStructure (casacore::String &msname, casacore::String &whichDataCol, casacore::Bool createWeightSpectrumCols, const casacore::Vector< casacore::Int > &tileShape=casacore::Vector< casacore::Int >(1, 0), const casacore::String &combine="", casacore::Table::TableOption option=casacore::Table::New)
 Method to make the basic structure of the MS. More...
 
casacore::Bool isAllColumns (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
 
casacore::Bool makeSelection ()
 Method that returns the selected ms (?! - but it's Boolean - RR) More...
 
casacore::Bool fillSubTables (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
 Sub-table fillers. More...
 
casacore::Bool fillFieldTable ()
 
casacore::Bool fillDDTables ()
 
casacore::Bool fillPolTable ()
 
casacore::Bool fillDDITable ()
 
casacore::Bool fillSPWTable ()
 
void relabelSources ()
 Sets up sourceRelabel_p for mapping input SourceIDs (if any) to output ones. More...
 
void copySubtable (const casacore::String &tabName, const casacore::Table &inTab, const casacore::Bool noRows=false)
 Adds and copies inTab to msOut_p without any filtering. More...
 
casacore::Bool copyPointing ()
 
void setupNewPointing ()
 Sets up the stub of a POINTING, enough to create an MSColumns. More...
 
casacore::Bool copySource ()
 
casacore::Bool copyAntenna ()
 
casacore::Bool copyFeed ()
 
casacore::Bool copyFlag_Cmd ()
 
casacore::Bool copyHistory ()
 
casacore::Bool copyObservation ()
 
casacore::Bool copyProcessor ()
 
casacore::Bool copyState ()
 
casacore::Bool copySyscal ()
 
casacore::Bool copyWeather ()
 
void copyMainTableKeywords (casacore::TableRecord &outKeys, const casacore::TableRecord &inKeys)
 
casacore::Int getProcessorId (casacore::Int dataDescriptionId, casacore::String msname)
 
casacore::Bool filterOptSubtable (const casacore::String &subtabname)
 This falls between copyGenericSubtables() and the copiers for standard sub-tables like copyFeed(). More...
 
casacore::Bool copyGenericSubtables ()
 
casacore::MeasurementSetgetInputMS ()
 Accesors for the casacore::MS objects. More...
 
casacore::MeasurementSetgetSelectedInputMS ()
 
casacore::MeasurementSetgetOutputMS ()
 
casacore::ROMSColumnsgetSelectedInputMSColumns ()
 
casacore::MSColumnsgetOutputMSColumns ()
 
std::map< casacore::Int,
casacore::Int > & 
getStateRemapper ()
 Accesors for the Re-mapper objects. More...
 
casacore::Vector< casacore::Int > & getAntennaRemapper ()
 
std::map< casacore::Int,
std::vector< casacore::Int > > & 
getDroppedChannelsMap ()
 
std::map< casacore::Int,
std::map< casacore::Int,
std::vector< casacore::Int > > > & 
getSelectedChannelsMap ()
 
void setVirtualModelCol (casacore::Bool virtualModelCol)
 Accesors for additional parameters. More...
 
void setVirtualCorrectedCol (casacore::Bool virtualCorrectedCol)
 
void setReindex (casacore::Bool reindex)
 

Static Public Member Functions

static const casacore::Vector
< casacore::MS::PredefinedColumns > & 
parseColumnNames (casacore::String colNameList)
 Declared static because it's used in setupMS(). More...
 
static const casacore::Vector
< casacore::MS::PredefinedColumns > & 
parseColumnNames (casacore::String colNameList, const casacore::MeasurementSet &ms, casacore::Bool virtualModelCol=false, casacore::Bool virtualCorrectedCol=false)
 This version uses the casacore::MeasurementSet to check what columns are present, i.e. More...
 
static casacore::uInt dataColStrToEnums (const casacore::String &col, casacore::Vector< casacore::MS::PredefinedColumns > &colvec)
 Helper function for parseColumnNames(). More...
 
static std::set< casacore::IntfindBadSpws (casacore::MeasurementSet &ms, casacore::Vector< casacore::Int > spwv)
 Returns the set (possibly empty) of spectral windows that are in SPW but not listed in ms's DATA_DESCRIPTION sub-table. More...
 
static casacore::Bool pickAntennas (casacore::Vector< casacore::Int > &selected_antennaids, casacore::Vector< casacore::String > &selected_antenna_strs, const casacore::Vector< casacore::Int > &antennaids, const casacore::Vector< casacore::String > &antennaSel)
 Helper function for selectAntenna() More...
 
static casacore::Bool getCorrMaps (casacore::MSSelection &mssel, const casacore::MeasurementSet &ms, casacore::Vector< casacore::Vector< casacore::Int > > &outToIn, const casacore::Bool areSelecting=false)
 Fills outToIn[pol] with a map from output correlation index to input correlation index, for each input polID pol. More...
 
static casacore::MeasurementSetsetupMS (const casacore::String &msname, const casacore::Int nchan, const casacore::Int npol, const casacore::String &telescop, const casacore::Vector< casacore::MS::PredefinedColumns > &colNamesTok, casacore::Bool createWeightSpectrumCols, const casacore::Int obstype=0, const casacore::Bool compress=false, const asdmStManUseAlternatives asdmStManUse=DONT, casacore::Table::TableOption option=casacore::Table::New)
 This sets up a default new ms Declared static as it can be (and is) called directly from outside Therefore it is not dependent on any member variable. More...
 
static casacore::MeasurementSetsetupMS (const casacore::String &msname, const casacore::Int nchan, const casacore::Int npol, const casacore::Vector< casacore::MS::PredefinedColumns > &colNamesTok, casacore::Bool createWeightSpectrumCols, const casacore::Vector< casacore::Int > &tileShape=casacore::Vector< casacore::Int >(1, 0), const casacore::Bool compress=false, const asdmStManUseAlternatives asdmStManUse=DONT, casacore::Table::TableOption option=casacore::Table::New)
 Same as above except allowing manual tileshapes. More...
 
static casacore::Bool mustConvertToData (const casacore::uInt nTok, const casacore::Vector< casacore::MS::PredefinedColumns > &datacols)
 The output casacore::MS must have (at least?) 1 of DATA, FLOAT_DATA, or LAG_DATA. More...
 
static void createSubtables (casacore::MeasurementSet &ms, casacore::Table::TableOption option)
 A customized version of casacore::MS::createDefaultSubtables(). More...
 
static casacore::uInt addOptionalColumns (const casacore::Table &inTab, casacore::Table &outTab, const casacore::Bool beLazy=false)
 Add optional columns to outTab if present in inTab and possColNames. More...
 
static void make_map (std::map< casacore::Int, casacore::Int > &mapper, const casacore::Vector< casacore::Int > &inv)
 Sets mapper to to a map from the distinct values of inv, in increasing order, to 0, 1, 2,..., mapper.size() - 1. More...
 
static casacore::Bool mergeSpwSubTables (casacore::Vector< casacore::String > filenames)
 To consolidate several sub-tables when dealing with MMS. More...
 
static casacore::Bool mergeDDISubTables (casacore::Vector< casacore::String > filenames)
 
static casacore::Bool mergeFeedSubTables (casacore::Vector< casacore::String > filenames, casacore::Vector< casacore::uInt > mapSubmsSpwid)
 
static casacore::Bool mergeSourceSubTables (casacore::Vector< casacore::String > filenames, casacore::Vector< casacore::uInt > mapSubmsSpwid)
 
static casacore::Bool mergeSyscalSubTables (casacore::Vector< casacore::String > filenames, casacore::Vector< casacore::uInt > mapSubmsSpwid)
 
static casacore::Bool mergeFreqOffsetTables (casacore::Vector< casacore::String > filenames, casacore::Vector< casacore::uInt > mapSubmsSpwid)
 
static casacore::Bool mergeCalDeviceSubtables (casacore::Vector< casacore::String > filenames, casacore::Vector< casacore::uInt > mapSubmsSpwid)
 
static casacore::Bool mergeSysPowerSubtables (casacore::Vector< casacore::String > filenames, casacore::Vector< casacore::uInt > mapSubmsSpwid)
 
template<class T >
static casacore::Bool columnOk (casacore::ArrayColumn< T > column)
 
More...
 
template<class T >
static casacore::Bool columnOk (casacore::ScalarColumn< T > column)
 
More...
 

Protected Member Functions

casacore::Bool copyEphemerisTable (casacore::MSFieldColumns &msField)
 copy ephemeris table and reindex field table if requested More...
 

Protected Attributes

casacore::MeasurementSet ms_p
 Initialized* by ctors. More...
 
casacore::MeasurementSet mssel_p
 
casacore::MSColumnsmsc_p
 
casacore::ROMSColumnsmscIn_p
 
casacore::Bool keepShape_p
 
casacore::Bool antennaSel_p
 same shape as the corresponding input one. More...
 
casacore::Double timeBin_p
 
casacore::String scanString_p
 
casacore::String intentString_p
 
casacore::String obsString_p
 
casacore::String uvrangeString_p
 
casacore::String taqlString_p
 
casacore::String feedString_p
 
casacore::String timeRange_p
 
casacore::String arrayExpr_p
 
casacore::String corrString_p
 
casacore::String spwString_p
 
casacore::String combine_p
 
casacore::Int fitorder_p
 scan #, observation, and/or state ID? Must be lowercase at all times. More...
 
casacore::String fitspw_p
 If < 0 (default), continuum subtraction is not done. More...
 
casacore::String fitoutspw_p
 
casacore::MeasurementSet msOut_p
 continuum subtraction. More...
 
casacore::Vector< casacore::Intspw_p
 
casacore::Vector< casacore::Intspw_uniq_p
 
casacore::Vector< casacore::Intnchan_p
 
casacore::Vector< casacore::Inttotnchan_p
 
casacore::Vector< casacore::IntchanStart_p
 
casacore::Vector< casacore::IntchanEnd_p
 
casacore::Vector< casacore::IntchanStep_p
 
casacore::Vector< casacore::Intwidths_p
 input channel will be used. More...
 
casacore::Vector< casacore::Intncorr_p
 
casacore::Vector< casacore::IntinNumChan_p
 
casacore::Vector< casacore::IntinNumCorr_p
 
std::map< casacore::Int,
std::vector< casacore::Int > > 
spwDropChannelMap_p
 
std::map< casacore::Int,
std::map< casacore::Int,
std::vector< casacore::Int > > > 
spwSelectedChannelMap_p
 
casacore::Vector< casacore::Intfieldid_p
 
casacore::Vector< casacore::IntspwRelabel_p
 
casacore::Vector< casacore::IntfieldRelabel_p
 
casacore::Vector< casacore::IntsourceRelabel_p
 
casacore::Vector< casacore::IntoldDDSpwMatch_p
 
casacore::Vector
< casacore::String
antennaSelStr_p
 
casacore::Vector< casacore::IntantennaId_p
 
casacore::Vector< casacore::IntantIndexer_p
 
casacore::Vector< casacore::IntantNewIndex_p
 
casacore::Vector< casacore::IntselObsId_p
 
casacore::Vector< casacore::IntpolID_p
 
casacore::Vector< casacore::Intspw2ddid_p
 
casacore::Vector
< casacore::Vector
< casacore::Int > > 
inPolOutCorrToInCorrMap_p
 inCorrInd = outPolCorrToInCorrMap_p[polID_p[ddID]][outCorrInd] More...
 
std::map< casacore::Int,
casacore::Int
stateRemapper_p
 
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
 
casacore::Bool virtualModelCol_p
 
casacore::Bool virtualCorrectedCol_p
 
casacore::Bool reindex_p
 

Detailed Description

MSTransformDataHandler definition.

Definition at line 49 of file MSTransformDataHandler.h.

Member Enumeration Documentation

Enumerator
DONT 
USE_FOR_DATA 
USE_FOR_DATA_WEIGHT_SIGMA_FLAG 

Definition at line 54 of file MSTransformDataHandler.h.

Constructor & Destructor Documentation

casa::MSTransformDataHandler::MSTransformDataHandler ( const casacore::String theMS,
casacore::Table::TableOption  option,
casacore::Bool  virtualModelCol = false,
casacore::Bool  virtualCorrectedCol = false,
casacore::Bool  reindex = true 
)
casa::MSTransformDataHandler::MSTransformDataHandler ( const casacore::MeasurementSet ms,
casacore::Bool  virtualModelCol = false,
casacore::Bool  virtualCorrectedCol = false,
casacore::Bool  reindex = true 
)
casa::MSTransformDataHandler::~MSTransformDataHandler ( )

Member Function Documentation

static casacore::uInt casa::MSTransformDataHandler::addOptionalColumns ( const casacore::Table inTab,
casacore::Table outTab,
const casacore::Bool  beLazy = false 
)
static

Add optional columns to outTab if present in inTab and possColNames.

beLazy should only be true if outTab is in its default state. Returns the number of added columns.

template<class T >
static casacore::Bool casa::MSTransformDataHandler::columnOk ( casacore::ArrayColumn< T >  column)
inlinestatic



template <class t>=""> casacore::Bool MSTransformDataHandler::columnOk (casacore::ArrayColumn<T> column)

jagonzal (CAS-6206): ndimColumn only returns >0 is there is the array column has fixed size

Definition at line 264 of file MSTransformDataHandler.h.

References casacore::TableColumn::hasContent(), casacore::TableColumn::isNull(), and casacore::ArrayColumn< T >::ndim().

template<class T >
static casacore::Bool casa::MSTransformDataHandler::columnOk ( casacore::ScalarColumn< T >  column)
inlinestatic



template <class t>=""> casacore::Bool MSTransformDataHandler::columnOk (casacore::ScalarColumn<T> column)

Definition at line 284 of file MSTransformDataHandler.h.

References casacore::TableColumn::hasContent(), and casacore::TableColumn::isNull().

casacore::Bool casa::MSTransformDataHandler::copyAntenna ( )
casacore::Bool casa::MSTransformDataHandler::copyEphemerisTable ( casacore::MSFieldColumns msField)
protected

copy ephemeris table and reindex field table if requested

casacore::Bool casa::MSTransformDataHandler::copyFeed ( )
casacore::Bool casa::MSTransformDataHandler::copyFlag_Cmd ( )
casacore::Bool casa::MSTransformDataHandler::copyGenericSubtables ( )
casacore::Bool casa::MSTransformDataHandler::copyHistory ( )
void casa::MSTransformDataHandler::copyMainTableKeywords ( casacore::TableRecord outKeys,
const casacore::TableRecord inKeys 
)
casacore::Bool casa::MSTransformDataHandler::copyObservation ( )
casacore::Bool casa::MSTransformDataHandler::copyPointing ( )
casacore::Bool casa::MSTransformDataHandler::copyProcessor ( )
casacore::Bool casa::MSTransformDataHandler::copySource ( )
casacore::Bool casa::MSTransformDataHandler::copyState ( )
void casa::MSTransformDataHandler::copySubtable ( const casacore::String tabName,
const casacore::Table inTab,
const casacore::Bool  noRows = false 
)

Adds and copies inTab to msOut_p without any filtering.

tabName is the table "type", i.e. POINTING or SYSPOWER without the preceding path.

If noRows is true, the structure will be setup but no rows will be copied (useful for filtering).

casacore::Bool casa::MSTransformDataHandler::copySyscal ( )
casacore::Bool casa::MSTransformDataHandler::copyWeather ( )
static void casa::MSTransformDataHandler::createSubtables ( casacore::MeasurementSet ms,
casacore::Table::TableOption  option 
)
static

A customized version of casacore::MS::createDefaultSubtables().

static casacore::uInt casa::MSTransformDataHandler::dataColStrToEnums ( const casacore::String col,
casacore::Vector< casacore::MS::PredefinedColumns > &  colvec 
)
static

Helper function for parseColumnNames().

Converts col to a list of casacore::MS::PredefinedColumnss, and returns the # of recognized data columns. static because parseColumnNames() is static.

casacore::Bool casa::MSTransformDataHandler::fillDDITable ( )
casacore::Bool casa::MSTransformDataHandler::fillDDTables ( )
casacore::Bool casa::MSTransformDataHandler::fillFieldTable ( )
casacore::Bool casa::MSTransformDataHandler::fillPolTable ( )
casacore::Bool casa::MSTransformDataHandler::fillSPWTable ( )
casacore::Bool casa::MSTransformDataHandler::fillSubTables ( const casacore::Vector< casacore::MS::PredefinedColumns > &  colNames)

Sub-table fillers.

casacore::Bool casa::MSTransformDataHandler::filterOptSubtable ( const casacore::String subtabname)

This falls between copyGenericSubtables() and the copiers for standard sub-tables like copyFeed().

It is for optional sub-tables like CALDEVICE and SYSPOWER which can be watched for by name and may need their ANTENNA_ID and SPECTRAL_WINDOW_ID columns re-mapped. (Technically FEED_ID, too, if split ever starts re-mapping feeds.)

It must be called BEFORE copyGenericSubtables()!

static std::set<casacore::Int> casa::MSTransformDataHandler::findBadSpws ( casacore::MeasurementSet ms,
casacore::Vector< casacore::Int spwv 
)
static

Returns the set (possibly empty) of spectral windows that are in SPW but not listed in ms's DATA_DESCRIPTION sub-table.

(This happens with certain calibration/hardware setups.)

casacore::Vector<casacore::Int>& casa::MSTransformDataHandler::getAntennaRemapper ( )
inline

Definition at line 310 of file MSTransformDataHandler.h.

References antNewIndex_p.

static casacore::Bool casa::MSTransformDataHandler::getCorrMaps ( casacore::MSSelection mssel,
const casacore::MeasurementSet ms,
casacore::Vector< casacore::Vector< casacore::Int > > &  outToIn,
const casacore::Bool  areSelecting = false 
)
static

Fills outToIn[pol] with a map from output correlation index to input correlation index, for each input polID pol.

It does not yet check the appropriateness of the correlation selection string, so ignore the return value for now. outToIn[pol] defaults to an empty casacore::Vector if no correlations are selected for pol. That is not the same as the default "select everything in ms".

std::map<casacore::Int, std::vector<casacore::Int> >& casa::MSTransformDataHandler::getDroppedChannelsMap ( )
inline

Definition at line 311 of file MSTransformDataHandler.h.

References spwDropChannelMap_p.

casacore::MeasurementSet* casa::MSTransformDataHandler::getInputMS ( )
inline

Accesors for the casacore::MS objects.

Definition at line 302 of file MSTransformDataHandler.h.

References ms_p.

casacore::MeasurementSet* casa::MSTransformDataHandler::getOutputMS ( )
inline

Definition at line 304 of file MSTransformDataHandler.h.

References msOut_p.

casacore::MSColumns* casa::MSTransformDataHandler::getOutputMSColumns ( )
inline

Definition at line 306 of file MSTransformDataHandler.h.

References msc_p.

casacore::Int casa::MSTransformDataHandler::getProcessorId ( casacore::Int  dataDescriptionId,
casacore::String  msname 
)
std::map<casacore::Int,std::map < casacore::Int, std::vector<casacore::Int> > >& casa::MSTransformDataHandler::getSelectedChannelsMap ( )
inline

Definition at line 312 of file MSTransformDataHandler.h.

References spwSelectedChannelMap_p.

casacore::MeasurementSet* casa::MSTransformDataHandler::getSelectedInputMS ( )
inline

Definition at line 303 of file MSTransformDataHandler.h.

References mssel_p.

casacore::ROMSColumns* casa::MSTransformDataHandler::getSelectedInputMSColumns ( )
inline

Definition at line 305 of file MSTransformDataHandler.h.

References mscIn_p.

std::map<casacore::Int, casacore::Int>& casa::MSTransformDataHandler::getStateRemapper ( )
inline

Accesors for the Re-mapper objects.

Definition at line 309 of file MSTransformDataHandler.h.

References stateRemapper_p.

casacore::Bool casa::MSTransformDataHandler::isAllColumns ( const casacore::Vector< casacore::MS::PredefinedColumns > &  colNames)
static void casa::MSTransformDataHandler::make_map ( std::map< casacore::Int, casacore::Int > &  mapper,
const casacore::Vector< casacore::Int > &  inv 
)
static

Sets mapper to to a map from the distinct values of inv, in increasing order, to 0, 1, 2,..., mapper.size() - 1.

casacore::Bool casa::MSTransformDataHandler::makeMSBasicStructure ( casacore::String msname,
casacore::String whichDataCol,
casacore::Bool  createWeightSpectrumCols,
const casacore::Vector< casacore::Int > &  tileShape = casacore::Vectorcasacore::Int >(1, 0),
const casacore::String combine = "",
casacore::Table::TableOption  option = casacore::Table::New 
)

Method to make the basic structure of the MS.

TileShape of size 1 can have 2 values [0], and [1]...these are used in to determine the tileshape by using MSTileLayout. Otherwise it has to be a vector size 3 e.g [4, 15, 351] => a tile shape of 4 stokes, 15 channels 351 rows.

combine sets combine_p. (Columns to ignore while time averaging.)

createWeightSpectrumCols: add WEIGHT/SIGMA_SPECTRUM columns

casacore::Bool casa::MSTransformDataHandler::makeSelection ( )

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

static casacore::Bool casa::MSTransformDataHandler::mergeCalDeviceSubtables ( casacore::Vector< casacore::String filenames,
casacore::Vector< casacore::uInt mapSubmsSpwid 
)
static
static casacore::Bool casa::MSTransformDataHandler::mergeDDISubTables ( casacore::Vector< casacore::String filenames)
static
static casacore::Bool casa::MSTransformDataHandler::mergeFeedSubTables ( casacore::Vector< casacore::String filenames,
casacore::Vector< casacore::uInt mapSubmsSpwid 
)
static
static casacore::Bool casa::MSTransformDataHandler::mergeFreqOffsetTables ( casacore::Vector< casacore::String filenames,
casacore::Vector< casacore::uInt mapSubmsSpwid 
)
static
static casacore::Bool casa::MSTransformDataHandler::mergeSourceSubTables ( casacore::Vector< casacore::String filenames,
casacore::Vector< casacore::uInt mapSubmsSpwid 
)
static
static casacore::Bool casa::MSTransformDataHandler::mergeSpwSubTables ( casacore::Vector< casacore::String filenames)
static

To consolidate several sub-tables when dealing with MMS.

static casacore::Bool casa::MSTransformDataHandler::mergeSyscalSubTables ( casacore::Vector< casacore::String filenames,
casacore::Vector< casacore::uInt mapSubmsSpwid 
)
static
static casacore::Bool casa::MSTransformDataHandler::mergeSysPowerSubtables ( casacore::Vector< casacore::String filenames,
casacore::Vector< casacore::uInt mapSubmsSpwid 
)
static
static casacore::Bool casa::MSTransformDataHandler::mustConvertToData ( const casacore::uInt  nTok,
const casacore::Vector< casacore::MS::PredefinedColumns > &  datacols 
)
inlinestatic

The output casacore::MS must have (at least?) 1 of DATA, FLOAT_DATA, or LAG_DATA.

MODEL_DATA or CORRECTED_DATA will be converted to DATA if necessary. jagonzal (CAS-5327): The implementation has to go here because a member function cannot have static linkage

Definition at line 181 of file MSTransformDataHandler.h.

References casacore::MSMainEnums::FLOAT_DATA, and casacore::MSMainEnums::LAG_DATA.

static const casacore::Vector<casacore::MS::PredefinedColumns>& casa::MSTransformDataHandler::parseColumnNames ( casacore::String  colNameList)
static

Declared static because it's used in setupMS().

colNameList is internally up-cased, so it is not const or passed by reference.

static const casacore::Vector<casacore::MS::PredefinedColumns>& casa::MSTransformDataHandler::parseColumnNames ( casacore::String  colNameList,
const casacore::MeasurementSet ms,
casacore::Bool  virtualModelCol = false,
casacore::Bool  virtualCorrectedCol = false 
)
static

This version uses the casacore::MeasurementSet to check what columns are present, i.e.

it makes col=="all" smarter, and it is not necessary to call verifyColumns() after calling this. Unlike the other version, it knows about FLOAT_DATA and LAG_DATA. It throws an exception if a specifically requested column is absent.

static casacore::Bool casa::MSTransformDataHandler::pickAntennas ( casacore::Vector< casacore::Int > &  selected_antennaids,
casacore::Vector< casacore::String > &  selected_antenna_strs,
const casacore::Vector< casacore::Int > &  antennaids,
const casacore::Vector< casacore::String > &  antennaSel 
)
static

Helper function for selectAntenna()

void casa::MSTransformDataHandler::relabelSources ( )

Sets up sourceRelabel_p for mapping input SourceIDs (if any) to output ones.

Must be called after fieldid_p is set and before calling fillFieldTable() or copySource().

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

Select Antennas to split out.

void casa::MSTransformDataHandler::selectArray ( const casacore::String subarray)

Select array IDs to use.

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

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

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

Select source or field.

casacore::Bool casa::MSTransformDataHandler::selectSpw ( const casacore::String spwstr,
const casacore::Vector< casacore::Int > &  steps 
)

Select spw and channels for each spw.

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

Select time parameters.

casacore::Bool casa::MSTransformDataHandler::setmsselect ( const casacore::String spw = "",
const casacore::String field = "",
const casacore::String baseline = "",
const casacore::String scan = "",
const casacore::String uvrange = "",
const casacore::String taql = "",
const casacore::Vector< casacore::Int > &  step = casacore::Vectorcasacore::Int >(1, 1),
const casacore::String subarray = "",
const casacore::String correlation = "",
const casacore::String intent = "",
const casacore::String obs = "",
const casacore::String feed = "" 
)

Selection method using msselection syntax.

casacore::Time is not handled by this method.

void casa::MSTransformDataHandler::setReindex ( casacore::Bool  reindex)
inline

Definition at line 317 of file MSTransformDataHandler.h.

References reindex_p.

static casacore::MeasurementSet* casa::MSTransformDataHandler::setupMS ( const casacore::String msname,
const casacore::Int  nchan,
const casacore::Int  npol,
const casacore::String telescop,
const casacore::Vector< casacore::MS::PredefinedColumns > &  colNamesTok,
casacore::Bool  createWeightSpectrumCols,
const casacore::Int  obstype = 0,
const casacore::Bool  compress = false,
const asdmStManUseAlternatives  asdmStManUse = DONT,
casacore::Table::TableOption  option = casacore::Table::New 
)
static

This sets up a default new ms Declared static as it can be (and is) called directly from outside Therefore it is not dependent on any member variable.

static casacore::MeasurementSet* casa::MSTransformDataHandler::setupMS ( const casacore::String msname,
const casacore::Int  nchan,
const casacore::Int  npol,
const casacore::Vector< casacore::MS::PredefinedColumns > &  colNamesTok,
casacore::Bool  createWeightSpectrumCols,
const casacore::Vector< casacore::Int > &  tileShape = casacore::Vectorcasacore::Int >(1, 0),
const casacore::Bool  compress = false,
const asdmStManUseAlternatives  asdmStManUse = DONT,
casacore::Table::TableOption  option = casacore::Table::New 
)
static

Same as above except allowing manual tileshapes.

void casa::MSTransformDataHandler::setupNewPointing ( )

Sets up the stub of a POINTING, enough to create an MSColumns.

void casa::MSTransformDataHandler::setVirtualCorrectedCol ( casacore::Bool  virtualCorrectedCol)
inline

Definition at line 316 of file MSTransformDataHandler.h.

References virtualCorrectedCol_p.

void casa::MSTransformDataHandler::setVirtualModelCol ( casacore::Bool  virtualModelCol)
inline

Accesors for additional parameters.

Definition at line 315 of file MSTransformDataHandler.h.

References virtualModelCol_p.

Member Data Documentation

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

Definition at line 371 of file MSTransformDataHandler.h.

casacore::Bool casa::MSTransformDataHandler::antennaSel_p
protected

same shape as the corresponding input one.

sameShape_p, // Iff true, the shapes of the arrays do not vary with row number.

Definition at line 328 of file MSTransformDataHandler.h.

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

Definition at line 370 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::antIndexer_p
protected

Definition at line 372 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::antNewIndex_p
protected

Definition at line 373 of file MSTransformDataHandler.h.

Referenced by getAntennaRemapper().

casacore::String casa::MSTransformDataHandler::arrayExpr_p
protected

Definition at line 338 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::chanEnd_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

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

Definition at line 384 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::chanStart_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::chanStep_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::combine_p
protected

Definition at line 339 of file MSTransformDataHandler.h.

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

Definition at line 385 of file MSTransformDataHandler.h.

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

Definition at line 386 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::corrString_p
protected

Definition at line 338 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::feedString_p
protected

Definition at line 334 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::fieldid_p
protected

Definition at line 367 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::fieldRelabel_p
protected

Definition at line 368 of file MSTransformDataHandler.h.

casacore::Int casa::MSTransformDataHandler::fitorder_p
protected

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

Definition at line 342 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::fitoutspw_p
protected

Definition at line 346 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::fitspw_p
protected

If < 0 (default), continuum subtraction is not done.

Definition at line 345 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::inNumChan_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::inNumCorr_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Vector<casacore::Int> > casa::MSTransformDataHandler::inPolOutCorrToInCorrMap_p
protected

inCorrInd = outPolCorrToInCorrMap_p[polID_p[ddID]][outCorrInd]

Definition at line 380 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::intentString_p
protected

Definition at line 334 of file MSTransformDataHandler.h.

casacore::Bool casa::MSTransformDataHandler::keepShape_p
protected

Definition at line 328 of file MSTransformDataHandler.h.

casacore::MeasurementSet casa::MSTransformDataHandler::ms_p
protected

Initialized* by ctors.

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

Definition at line 325 of file MSTransformDataHandler.h.

Referenced by getInputMS().

casacore::MSColumns* casa::MSTransformDataHandler::msc_p
protected

Definition at line 326 of file MSTransformDataHandler.h.

Referenced by getOutputMSColumns().

casacore::ROMSColumns* casa::MSTransformDataHandler::mscIn_p
protected

Definition at line 327 of file MSTransformDataHandler.h.

Referenced by getSelectedInputMSColumns().

casacore::MeasurementSet casa::MSTransformDataHandler::msOut_p
protected

continuum subtraction.

Uninitialized by ctors.

Definition at line 350 of file MSTransformDataHandler.h.

Referenced by getOutputMS().

casacore::MeasurementSet casa::MSTransformDataHandler::mssel_p
protected

Definition at line 325 of file MSTransformDataHandler.h.

Referenced by getSelectedInputMS().

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::nchan_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::ncorr_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::obsString_p
protected

Definition at line 334 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::oldDDSpwMatch_p
protected

Definition at line 369 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::polID_p
protected

Definition at line 376 of file MSTransformDataHandler.h.

casacore::Bool casa::MSTransformDataHandler::reindex_p
protected

Definition at line 391 of file MSTransformDataHandler.h.

Referenced by setReindex().

casacore::String casa::MSTransformDataHandler::scanString_p
protected

Definition at line 334 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::selObsId_p
protected

Definition at line 375 of file MSTransformDataHandler.h.

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

Definition at line 387 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::sourceRelabel_p
protected

Definition at line 368 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::spw2ddid_p
protected

Definition at line 377 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::spw_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::spw_uniq_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

std::map<casacore::Int, std::vector<casacore::Int> > casa::MSTransformDataHandler::spwDropChannelMap_p
protected

Definition at line 364 of file MSTransformDataHandler.h.

Referenced by getDroppedChannelsMap().

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::spwRelabel_p
protected

Definition at line 368 of file MSTransformDataHandler.h.

std::map<casacore::Int, std::map < casacore::Int, std::vector<casacore::Int> > > casa::MSTransformDataHandler::spwSelectedChannelMap_p
protected

Definition at line 365 of file MSTransformDataHandler.h.

Referenced by getSelectedChannelsMap().

casacore::String casa::MSTransformDataHandler::spwString_p
protected

Definition at line 338 of file MSTransformDataHandler.h.

std::map<casacore::Int, casacore::Int> casa::MSTransformDataHandler::stateRemapper_p
protected

Definition at line 382 of file MSTransformDataHandler.h.

Referenced by getStateRemapper().

casacore::String casa::MSTransformDataHandler::taqlString_p
protected

Definition at line 334 of file MSTransformDataHandler.h.

casacore::Double casa::MSTransformDataHandler::timeBin_p
protected

Definition at line 333 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::timeRange_p
protected

Definition at line 338 of file MSTransformDataHandler.h.

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::totnchan_p
protected

Definition at line 351 of file MSTransformDataHandler.h.

casacore::String casa::MSTransformDataHandler::uvrangeString_p
protected

Definition at line 334 of file MSTransformDataHandler.h.

casacore::Bool casa::MSTransformDataHandler::virtualCorrectedCol_p
protected

Definition at line 390 of file MSTransformDataHandler.h.

Referenced by setVirtualCorrectedCol().

casacore::Bool casa::MSTransformDataHandler::virtualModelCol_p
protected

Definition at line 389 of file MSTransformDataHandler.h.

Referenced by setVirtualModelCol().

casacore::Vector<casacore::Int> casa::MSTransformDataHandler::widths_p
protected

input channel will be used.

Definition at line 351 of file MSTransformDataHandler.h.


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