casa
5.7.0-16
|
List visibility records from a Measurement Set. More...
#include <MSLister.h>
Public Member Functions | |
MSLister () | |
Null constructor. More... | |
MSLister (const MeasurementSet &ms, LogIO &os) | |
Construct from a MeasurementSet (set pointer), set formatting string, and initialise listing with os. More... | |
MSLister (MSLister &other) | |
Copy constructor, this will initialise the MSLister's MS with other's MS. More... | |
MSLister & | operator= (MSLister &other) |
Assignment, this will initialise the MSLister's MS with other's MS. More... | |
~MSLister () | |
Destructor. More... | |
Bool | setNewOS (LogIO &os) |
Change or set the OS this MSLister uses. More... | |
Bool | setMS (MeasurementSet &ms) |
Change or set the MS this MSLister refers to, and reinitialise the MSLister object. More... | |
void | setPage (const uInt width=120, const uInt height=20) |
Page size for various formats, output devices (default for landscape printing). More... | |
void | setFormat (const uInt ndec=2) |
Format for output, ie data display precision. More... | |
void | setPrecision (const Int precTime=1, const Int precUVDist=0, const Int precAmpl=3, const int precPhase=1, const Int precWeight=0) |
User choices for list precision (sensible defaults): (time precision for user interface is fraction of sec) More... | |
void | list (const String &options="", const String &datacolumn="", const String &field="", const String &spw="", const String &antenna="", const String &timerange="", const String &correlation="", const String &scan="", const String &feed="", const String &array="", const String &observation="", const String &uvrange="", const String &average="", const bool showflags=False, const String &msSelect="", const long pagerows=50, const String &listfile="") |
List the visibilities, with optional data selection and output specification. More... | |
void | selectvis (const String &timerange="", const String &spw="", const String &scan="", const String &field="", const String &baseline="", const String &uvrange="", const String &chanmode="none", const Int &nchan=1, const Int &start=0, const Int &step=1, const MRadialVelocity &mStart=MRadialVelocity(), const MRadialVelocity &mStep=MRadialVelocity(), const String &correlation="", const String &array="", const String &observation="", const String &msSelect="") |
Set uv-data selection via MSSelection. More... | |
Private Member Functions | |
void | initList () |
Initialise the listing. More... | |
void | listHeader () |
A preamble of abbreviated MSSummary information. More... | |
void | getRanges (const MeasurementSet &ms) |
Get the ranges of a fixed set of MS key attributes. More... | |
void | listData (const int pageRows=50, const String listfile="") |
Most of the heavy lifting is in here. More... | |
void | listColumnHeader (ostream &myout) |
Column header line for pagination of output. More... | |
void | _polarizationSetup (const uInt selPolID) |
Setup class polarization information for specified MS. More... | |
void | polarizationParse (String correlation) |
Parse the correlation parameter value; fill indexPols_p to output selected polarizations. More... | |
Int | columnWidth (const Vector< String > antNames) |
Calculate column width for a Vector<String> More... | |
void | clearFlags () |
Clear the formatting flags. More... | |
Private Attributes | |
MeasurementSet * | pMS_p |
Pointer to the MS. More... | |
MeasurementSet * | pMSSel_p |
LogIO | logStream_p |
Output stream. More... | |
const String | dashline_p |
A formatting string for convenience. More... | |
MSSelector | mss_p |
The MSSelector object used in list() etc. More... | |
Matrix< Int > | chanList_p |
List of channels. More... | |
Bool | multiChan_p |
True if listing multiple channels. More... | |
uInt | npols_p |
Pol counters. More... | |
Vector< String > | pols_p |
SpW/Pol info from subtables. More... | |
Vector< Double > | freqs_p |
Vector< Int > | spwins_p |
SpWId map from DDIs: More... | |
Bool | multiSpw_p |
True if listing multiple spws. More... | |
Vector< Int > | indexPols_p |
Polarization indexing variables; for polarization (correlation) selection. More... | |
uInt | nIndexPols_p |
uInt | wTime_p |
Field width variables. More... | |
uInt | wAnt1_p |
uInt | wAnt2_p |
uInt | wIntrf_p |
uInt | wUVDist_p |
uInt | wUVW_p |
uInt | wFld_p |
uInt | wSpW_p |
uInt | wChn_p |
uInt | wAmpl_p |
uInt | wPhase_p |
uInt | wWeight_p |
uInt | wVis_p |
uInt | wFlag_p |
uInt | wTotal_p |
uInt | oTime_p |
Order of magnitude control (digits to left of decimal, including sign) More... | |
uInt | oUVDist_p |
uInt | oUVW_p |
uInt | oAmpl_p |
uInt | oPhase_p |
uInt | oWeight_p |
Int | precTime_p |
Precision control (digits to right of decimal point) (precTime_p includes hhmmss, so 7 yields hh:mm:ss.s) More... | |
Int | precUVDist_p |
Int | precUVW_p |
Int | precAmpl_p |
Int | precPhase_p |
Int | precWeight_p |
Int | pageWidth_p |
Page params. More... | |
Int | pageHeight_p |
Int | nDecimal_p |
String | date_p |
String | lastdate_p |
Vector< String > | items_p |
for assigning desired columns from the ms More... | |
Bool | doFld_p |
Bools for column showing and to identify FLOAT_DATA column of single dish. More... | |
Bool | doSpW_p |
Bool | doChn_p |
Bool | is_float |
Vector< String > | dataColSel |
Data selections data –> "amplitude", "phase" corrected –> "corrected_amplitude", "corrected_phase" model –> "model_amplitude", "model_phase" residual –> "residual_amplitude", "residual_phase". More... | |
Record | ranges_p |
The Record object containing the MSSelector ranges. More... | |
Record | dataRecords_p |
The conversion of the above to a regular Record object. More... | |
List visibility records from a Measurement Set.
Public interface
The name comes from being a Lister for a MS.
MSs containing (u,v) data consist of amplitudes and phases for each baseline and sample time, typically sorted in TB order. These visibilities sometimes need to be examined one record at a time in a text-based format, giving the user access to their raw data. This class provides that access in a choice of several formats.
An MSLister
object is constructed from a MS
object, and then logged to the supplied LogIO
object. A new LogIO
object is defined for a more restricted listing.
Caution: Note that if the MS
goes out of scope, this class will retrieve rubbish (probably giving runtime errors) as it just maintains a pointer to the image;
The viewing of the raw data is a basic capability that is commonly required.
MSLister::list
are not funcational presently. Definition at line 120 of file MSLister.h.
casacore::MSLister::MSLister | ( | ) |
Null constructor.
casacore::MSLister::MSLister | ( | const MeasurementSet & | ms, |
LogIO & | os | ||
) |
Construct from a MeasurementSet (set pointer), set formatting string, and initialise listing with os.
casacore::MSLister::MSLister | ( | MSLister & | other | ) |
Copy constructor, this will initialise the MSLister's MS with other's MS.
casacore::MSLister::~MSLister | ( | ) |
Destructor.
|
private |
Setup class polarization information for specified MS.
pols_p holds the polarization names contained in the MS in the same order that the polarization data are listed in the main table.
|
private |
Clear the formatting flags.
Calculate column width for a Vector<String>
|
private |
Get the ranges of a fixed set of MS key attributes.
|
private |
Initialise the listing.
initList() does things that need to be done once per MS: declares and initialises the private MSSelector object, and gets all the attribute ranges up front.
void casacore::MSLister::list | ( | const String & | options = "" , |
const String & | datacolumn = "" , |
||
const String & | field = "" , |
||
const String & | spw = "" , |
||
const String & | antenna = "" , |
||
const String & | timerange = "" , |
||
const String & | correlation = "" , |
||
const String & | scan = "" , |
||
const String & | feed = "" , |
||
const String & | array = "" , |
||
const String & | observation = "" , |
||
const String & | uvrange = "" , |
||
const String & | average = "" , |
||
const bool | showflags = False , |
||
const String & | msSelect = "" , |
||
const long | pagerows = 50 , |
||
const String & | listfile = "" |
||
) |
List the visibilities, with optional data selection and output specification.
|
private |
Column header line for pagination of output.
|
private |
Most of the heavy lifting is in here.
Get the data records and list them.
|
private |
A preamble of abbreviated MSSummary information.
Assignment, this will initialise the MSLister's MS with other's MS.
|
private |
Parse the correlation parameter value; fill indexPols_p to output selected polarizations.
If correlation is empty, all polarizations are selected.
void casacore::MSLister::selectvis | ( | const String & | timerange = "" , |
const String & | spw = "" , |
||
const String & | scan = "" , |
||
const String & | field = "" , |
||
const String & | baseline = "" , |
||
const String & | uvrange = "" , |
||
const String & | chanmode = "none" , |
||
const Int & | nchan = 1 , |
||
const Int & | start = 0 , |
||
const Int & | step = 1 , |
||
const MRadialVelocity & | mStart = MRadialVelocity() , |
||
const MRadialVelocity & | mStep = MRadialVelocity() , |
||
const String & | correlation = "" , |
||
const String & | array = "" , |
||
const String & | observation = "" , |
||
const String & | msSelect = "" |
||
) |
Set uv-data selection via MSSelection.
void casacore::MSLister::setFormat | ( | const uInt | ndec = 2 | ) |
Format for output, ie data display precision.
Bool casacore::MSLister::setMS | ( | MeasurementSet & | ms | ) |
Change or set the MS this MSLister refers to, and reinitialise the MSLister object.
Do this after setNewOS() if doing both.
Page size for various formats, output devices (default for landscape printing).
void casacore::MSLister::setPrecision | ( | const Int | precTime = 1 , |
const Int | precUVDist = 0 , |
||
const Int | precAmpl = 3 , |
||
const int | precPhase = 1 , |
||
const Int | precWeight = 0 |
||
) |
User choices for list precision (sensible defaults): (time precision for user interface is fraction of sec)
List of channels.
Definition at line 253 of file MSLister.h.
|
private |
A formatting string for convenience.
Definition at line 247 of file MSLister.h.
Data selections data –> "amplitude", "phase" corrected –> "corrected_amplitude", "corrected_phase" model –> "model_amplitude", "model_phase" residual –> "residual_amplitude", "residual_phase".
Definition at line 305 of file MSLister.h.
|
private |
The conversion of the above to a regular Record object.
Definition at line 311 of file MSLister.h.
|
private |
Definition at line 292 of file MSLister.h.
|
private |
Definition at line 298 of file MSLister.h.
|
private |
Bools for column showing and to identify FLOAT_DATA column of single dish.
Definition at line 298 of file MSLister.h.
|
private |
Definition at line 298 of file MSLister.h.
Definition at line 262 of file MSLister.h.
Polarization indexing variables; for polarization (correlation) selection.
Definition at line 270 of file MSLister.h.
|
private |
Definition at line 298 of file MSLister.h.
for assigning desired columns from the ms
Definition at line 295 of file MSLister.h.
|
private |
Definition at line 292 of file MSLister.h.
|
private |
Output stream.
Definition at line 244 of file MSLister.h.
|
private |
The MSSelector object used in list() etc.
Definition at line 250 of file MSLister.h.
|
private |
True if listing multiple channels.
Definition at line 255 of file MSLister.h.
|
private |
True if listing multiple spws.
Definition at line 267 of file MSLister.h.
|
private |
Definition at line 291 of file MSLister.h.
|
private |
Definition at line 271 of file MSLister.h.
|
private |
Pol counters.
Definition at line 258 of file MSLister.h.
|
private |
Definition at line 281 of file MSLister.h.
|
private |
Definition at line 281 of file MSLister.h.
|
private |
Order of magnitude control (digits to left of decimal, including sign)
Definition at line 280 of file MSLister.h.
|
private |
Definition at line 280 of file MSLister.h.
|
private |
Definition at line 280 of file MSLister.h.
|
private |
Definition at line 282 of file MSLister.h.
|
private |
Definition at line 291 of file MSLister.h.
|
private |
Page params.
Definition at line 291 of file MSLister.h.
|
private |
Pointer to the MS.
Definition at line 240 of file MSLister.h.
|
private |
Definition at line 241 of file MSLister.h.
SpW/Pol info from subtables.
Definition at line 261 of file MSLister.h.
|
private |
Definition at line 287 of file MSLister.h.
|
private |
Definition at line 287 of file MSLister.h.
|
private |
Precision control (digits to right of decimal point) (precTime_p includes hhmmss, so 7 yields hh:mm:ss.s)
Definition at line 286 of file MSLister.h.
|
private |
Definition at line 286 of file MSLister.h.
|
private |
Definition at line 286 of file MSLister.h.
|
private |
Definition at line 288 of file MSLister.h.
|
private |
The Record object containing the MSSelector ranges.
Definition at line 308 of file MSLister.h.
SpWId map from DDIs:
Definition at line 265 of file MSLister.h.
|
private |
Definition at line 276 of file MSLister.h.
|
private |
Definition at line 274 of file MSLister.h.
|
private |
Definition at line 274 of file MSLister.h.
|
private |
Definition at line 275 of file MSLister.h.
|
private |
Definition at line 276 of file MSLister.h.
|
private |
Definition at line 275 of file MSLister.h.
|
private |
Definition at line 274 of file MSLister.h.
|
private |
Definition at line 276 of file MSLister.h.
|
private |
Definition at line 275 of file MSLister.h.
|
private |
Field width variables.
Definition at line 274 of file MSLister.h.
|
private |
Definition at line 277 of file MSLister.h.
|
private |
Definition at line 274 of file MSLister.h.
|
private |
Definition at line 274 of file MSLister.h.
|
private |
Definition at line 276 of file MSLister.h.
|
private |
Definition at line 276 of file MSLister.h.