casa::Partition Class Reference

Bool isAllColumns(const Vector<MS::PredefinedColumns>& colNames);. More...

#include <Partition.h>

List of all members.

Public Member Functions

 Partition (String &theMS, Table::TableOption option=Table::Old)
 Partition (MeasurementSet &ms)
 construct from an MS
virtual ~Partition ()
void setMS (MeasurementSet &ms)
 Change or Set the MS this MSSelector refers to.
Bool selectSpw (const String &spwstr)
 Select spw and channels for each spw.
Bool setmsselect (const String &spw="", const String &field="", const String &baseline="", const String &scan="", const String &uvrange="", const String &taql="", const String &subarray="", const String &intent="", const String &obs="")
 select Time and time averaging or regridding void selectTime();
Bool selectSource (const Vector< Int > &fieldid)
 Select source or field.
void selectAntenna (Vector< Int > &antennaids, Vector< String > &antennaSel)
 Select Antennas to split out.
void selectArray (const String &subarray)
 Select array IDs to use.
void selectTime (Double timeBin=-1.0, String timerng="")
 select time parameters
Bool makePartition (String &outname, String &whichDataCol, const Vector< Int > &tileShape=Vector< Int >(1, 0), const String &combine="")
 void selectSource(Vector<String> sourceid);
virtual MeasurementSet * makeScratchPartition (const Vector< MS::PredefinedColumns > &whichDataCols, const Bool forceInMemory=False)
 Method to make a scratch partition and even in memory if posssible Useful if temporary subselection/averaging is necessary It'll be in memory if the basic output ms is less than half of memory reported by HostInfo unless forced to by user.
virtual MeasurementSet * makeScratchPartition (const String &whichDataCol, const Bool forceInMemory=False)
 In this form whichDataCol gets passed to parseColumnNames().
void verifyColumns (const MeasurementSet &ms, const Vector< MS::PredefinedColumns > &colNames)

Static Public Member Functions

static MeasurementSet * setupMS (const String &msname, const MeasurementSet &inms, const Int nchan, const Int npol, const String &telescop, const Vector< MS::PredefinedColumns > &colNamesTok, const Int obstype=0)
 This sets up a default new ms Declared static as it can be called directly outside of Partition.
static MeasurementSet * setupMS (const String &msname, const MeasurementSet &inms, const Int nchan, const Int npol, const Vector< MS::PredefinedColumns > &colNamesTok, const Vector< Int > &tileShape=Vector< Int >(1, 0))
 Same as above except allowing manual tileshapes.

Private Member Functions

Bool makeSelection ()
 method that returns the selected ms (?! - but it's Boolean - RR)
Bool fillAllTables (const Vector< MS::PredefinedColumns > &colNames)
 (Sub)table fillers.
Bool fillMainTable (const Vector< MS::PredefinedColumns > &colNames)
Bool fillAccessoryMainCols ()
 Bool writeDiffSpwShape(const Vector<MS::PredefinedColumns>& colNames);.
Bool getDataColumn (ROArrayColumn< Complex > &data, const MS::PredefinedColumns colName)
 *** Private member functions ***
Bool getDataColumn (ROArrayColumn< Float > &data, const MS::PredefinedColumns colName)
Bool putDataColumn (MSColumns &msc, ROArrayColumn< Complex > &data, const MS::PredefinedColumns datacol, const Bool writeToDataCol=False)
Bool putDataColumn (MSColumns &msc, ROArrayColumn< Float > &data, const MS::PredefinedColumns datacol, const Bool writeToDataCol=False)
Bool copyDataFlagsWtSp (const Vector< MS::PredefinedColumns > &colNames, const Bool writeToDataCol)
 This method uses VisIter for efficient copy mode data transfer.
Double n_bytes ()
 Used in a couple of places to estimate how much memory to grab.
Bool doTimeAver (const Vector< MS::PredefinedColumns > &dataColNames)
 Read the input, time average it to timeBin_p, and write the output.

Static Private Member Functions

static void getDataColMap (MSMainColumns *msc, ArrayColumn< Complex > *mapper, uInt ntok, const Vector< MS::PredefinedColumns > &colEnums)
 Fills mapper[ntok] with a map from dataColumn indices to ArrayColumns in the output.

Private Attributes

MeasurementSet ms_p
 *** Member variables ***
MeasurementSet mssel_p
MSMainColumns * msc_p
ROMSColumns * mscIn_p
Bool antennaSel_p
Double timeBin_p
String scanString_p
String intentString_p
String obsString_p
String uvrangeString_p
String taqlString_p
String timeRange_p
String arrayExpr_p
String corrString_p
String combine_p
Int maxnchan_p
 scan #, observation, and/or state ID? Must be lowercase at all times.
Int maxncorr_p
MeasurementSet msOut_p
 are Int instead of uInt.
Vector< Int > spw_p
Vector< Int > fieldid_p
Vector< String > antennaSelStr_p
Vector< Int > antennaId_p
Vector< Int > arrayId_p
Matrix< Double > selTimeRanges_p

Detailed Description

Bool isAllColumns(const Vector<MS::PredefinedColumns>& colNames);.

Definition at line 76 of file Partition.h.


Constructor & Destructor Documentation

casa::Partition::Partition ( String &  theMS,
Table::TableOption  option = Table::Old 
)
casa::Partition::Partition ( MeasurementSet &  ms  ) 

construct from an MS

virtual casa::Partition::~Partition (  )  [virtual]

Member Function Documentation

Bool casa::Partition::copyDataFlagsWtSp ( const Vector< MS::PredefinedColumns > &  colNames,
const Bool  writeToDataCol 
) [private]

This method uses VisIter for efficient copy mode data transfer.

Bool casa::Partition::doTimeAver ( const Vector< MS::PredefinedColumns > &  dataColNames  )  [private]

Read the input, time average it to timeBin_p, and write the output.

Bool casa::Partition::fillAccessoryMainCols (  )  [private]

Bool writeDiffSpwShape(const Vector<MS::PredefinedColumns>& colNames);.

Bool casa::Partition::fillAllTables ( const Vector< MS::PredefinedColumns > &  colNames  )  [private]

(Sub)table fillers.

Bool casa::Partition::fillMainTable ( const Vector< MS::PredefinedColumns > &  colNames  )  [private]
static void casa::Partition::getDataColMap ( MSMainColumns *  msc,
ArrayColumn< Complex > *  mapper,
uInt  ntok,
const Vector< MS::PredefinedColumns > &  colEnums 
) [static, private]

Fills mapper[ntok] with a map from dataColumn indices to ArrayColumns in the output.

mapper must have ntok slots!

Bool casa::Partition::getDataColumn ( ROArrayColumn< Float > &  data,
const MS::PredefinedColumns  colName 
) [private]
Bool casa::Partition::getDataColumn ( ROArrayColumn< Complex > &  data,
const MS::PredefinedColumns  colName 
) [private]

*** Private member functions ***

Bool casa::Partition::makePartition ( String &  outname,
String &  whichDataCol,
const Vector< Int > &  tileShape = Vector< Int >(1, 0),
const String &  combine = "" 
)

void selectSource(Vector<String> sourceid);

Method to set if a phase Center rotation is needed void setPhaseCenter(Int fieldid, MDirection& newPhaseCenter);

Method to make the partition.

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.)

virtual MeasurementSet* casa::Partition::makeScratchPartition ( const String &  whichDataCol,
const Bool  forceInMemory = False 
) [virtual]

In this form whichDataCol gets passed to parseColumnNames().

virtual MeasurementSet* casa::Partition::makeScratchPartition ( const Vector< MS::PredefinedColumns > &  whichDataCols,
const Bool  forceInMemory = False 
) [virtual]

Method to make a scratch partition and even in memory if posssible Useful if temporary subselection/averaging is necessary It'll be in memory if the basic output ms is less than half of memory reported by HostInfo unless forced to by user.

.\.

Bool casa::Partition::makeSelection (  )  [private]

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

Double casa::Partition::n_bytes (  )  [inline, private]

Used in a couple of places to estimate how much memory to grab.

Definition at line 191 of file Partition.h.

References maxnchan_p, maxncorr_p, and mssel_p.

Bool casa::Partition::putDataColumn ( MSColumns &  msc,
ROArrayColumn< Float > &  data,
const MS::PredefinedColumns  datacol,
const Bool  writeToDataCol = False 
) [private]
Bool casa::Partition::putDataColumn ( MSColumns &  msc,
ROArrayColumn< Complex > &  data,
const MS::PredefinedColumns  datacol,
const Bool  writeToDataCol = False 
) [private]
void casa::Partition::selectAntenna ( Vector< Int > &  antennaids,
Vector< String > &  antennaSel 
) [inline]

Select Antennas to split out.

Definition at line 108 of file Partition.h.

References antennaId_p, antennaSel_p, and antennaSelStr_p.

void casa::Partition::selectArray ( const String &  subarray  ) 

Select array IDs to use.

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

Select source or field.

Bool casa::Partition::selectSpw ( const String &  spwstr  ) 

Select spw and channels for each spw.

It returns true on success and false on failure.

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

select time parameters

void casa::Partition::setMS ( MeasurementSet &  ms  ) 

Change or Set the MS this MSSelector refers to.

Bool casa::Partition::setmsselect ( const String &  spw = "",
const String &  field = "",
const String &  baseline = "",
const String &  scan = "",
const String &  uvrange = "",
const String &  taql = "",
const String &  subarray = "",
const String &  intent = "",
const String &  obs = "" 
)

select Time and time averaging or regridding void selectTime();

select stuff using msselection syntax ...time is left out call it separately with timebin

static MeasurementSet* casa::Partition::setupMS ( const String &  msname,
const MeasurementSet &  inms,
const Int  nchan,
const Int  npol,
const Vector< MS::PredefinedColumns > &  colNamesTok,
const Vector< Int > &  tileShape = Vector< Int >(1, 0) 
) [static]

Same as above except allowing manual tileshapes.

static MeasurementSet* casa::Partition::setupMS ( const String &  msname,
const MeasurementSet &  inms,
const Int  nchan,
const Int  npol,
const String &  telescop,
const Vector< MS::PredefinedColumns > &  colNamesTok,
const Int  obstype = 0 
) [static]

This sets up a default new ms Declared static as it can be called directly outside of Partition.

Therefore it is not dependent on any member variable.

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

Member Data Documentation

Vector<Int> casa::Partition::antennaId_p [private]

Definition at line 229 of file Partition.h.

Referenced by selectAntenna().

Definition at line 210 of file Partition.h.

Referenced by selectAntenna().

Vector<String> casa::Partition::antennaSelStr_p [private]

Definition at line 228 of file Partition.h.

Referenced by selectAntenna().

String casa::Partition::arrayExpr_p [private]

Definition at line 216 of file Partition.h.

Vector<Int> casa::Partition::arrayId_p [private]

Definition at line 230 of file Partition.h.

String casa::Partition::combine_p [private]

Definition at line 217 of file Partition.h.

Definition at line 216 of file Partition.h.

Vector<Int> casa::Partition::fieldid_p [private]

Definition at line 227 of file Partition.h.

Definition at line 212 of file Partition.h.

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

Definition at line 220 of file Partition.h.

Referenced by n_bytes().

Definition at line 220 of file Partition.h.

Referenced by n_bytes().

MeasurementSet casa::Partition::ms_p [private]

*** Member variables ***

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

Definition at line 207 of file Partition.h.

MSMainColumns* casa::Partition::msc_p [private]

Definition at line 208 of file Partition.h.

ROMSColumns* casa::Partition::mscIn_p [private]

Definition at line 209 of file Partition.h.

MeasurementSet casa::Partition::msOut_p [private]

are Int instead of uInt.

)

Uninitialized by ctors.

Definition at line 225 of file Partition.h.

MeasurementSet casa::Partition::mssel_p [private]

Definition at line 207 of file Partition.h.

Referenced by n_bytes().

String casa::Partition::obsString_p [private]

Definition at line 212 of file Partition.h.

Definition at line 212 of file Partition.h.

Matrix<Double> casa::Partition::selTimeRanges_p [private]

Definition at line 231 of file Partition.h.

Vector<Int> casa::Partition::spw_p [private]

Definition at line 226 of file Partition.h.

Definition at line 212 of file Partition.h.

Double casa::Partition::timeBin_p [private]

Definition at line 211 of file Partition.h.

String casa::Partition::timeRange_p [private]

Definition at line 216 of file Partition.h.

Definition at line 212 of file Partition.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1