Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1367 |
|
This section presents a simple comparison key to accessing information in flat tables versus a MeasurementSet. The following table summarizes the conversion; the Flat Table Column is the table keyword used in flat tables and the MeasurementSet Column is the corresponding keyword while Table specifies whether the information exists in the main table or in a subtable. Data information in the ``main'' table is invoked normally:
- a := table('example.MS'); - scans := a.getcol('SCAN_NUMBER');
Data information in subtables is accessed by adding a subdirectory to the MeasurementSet descriptor:
- a := table('example.MS/SOURCE'); - object := a.getcol('NAME');
Flat Table Column | MeasurementSet Column | Table |
Time | TIMEa | main |
DATA | FLOAT_DATAb | main |
SCAN | SCAN_NUMBER | main |
SUBSCAN | NS_GBT_SUBSCAN | main |
RECEIVER_ID | RCVRID | NS_GBT_BACKEND |
OBJECT | NAME | SOURCE |
PSRDM | PSRDM | NS_GBT_BACKEND |
PHASE_ID | NS_GBT_PHASE_ID | main |
UTCSTART | TIMEa | main |
UTDATE | TIMEa | main |
PHASETIM | PHASETIM | NS_GBT_BACKEND |
FREQRES | RESOLUTION | SPECTRAL_WINDOW |
OBSFREQ | REF_FREQUENCY | SPECTRAL_WINDOW |
RFSIDE | RFSIDE | NS_GBT_BACKEND |
IFSIDE | IFSIDE | NS_GBT_BACKEND |
IFF | IFF | NS_GBT_BACKEND |
CAL | CAL | NS_GBT_BACKEND |
SIGREF | SIGREF | NS_GBT_BACKEND |
PHASETIM | PHASETIM | NS_GBT_BACKEND |
BLANKTIM | BLANKTIM | NS_GBT_BACKEND |
a In MeasurementSets, the TIME is in UTC seconds. To convert to flat table Time:
- a := table('example.MS'); # Get the table into Glish. - b := a.getcol('TIME'); # Get the TIME column. - c := dm.unit(b[1],'s'); # Add the units explicity. - d := dm.epoch('utc',c) # Define the epoch. - e := d.m0.value # e will be the 'Time' from the flat table.
To get UTDATE, use the 'r_utc' reference code in the dm.epoch command.
b DATA is a 2-dimensional array while FLOAT_DATA is a 3 dimensional array. (e.g. if data::shape is [256,1357], then float_data::shape will be [1,256,1357].