Python for ALMA/VLA Science Data Model
Project description
sdmpy -- P. Demorest, 2015/03
Simple classes for reading VLA/ALMA Science Data Model (SDM) XML
files. The structure of the SDM is a set of tables, which contain
rows of data. The main goal of this is to have a straightforward,
relatively dependency-free way of doing simple or low-level stuff with
SDMs (e.g., for situations where invoking CASA is unnecessary).
Here is a short ipython session showing a example usage:
In [1]: import sdmpy
In [2]: s = sdmpy.SDM('15A-105_sb30463808_1.57082.53091797454')
In [3]: s.tables
Out[3]:
['SpectralWindow',
'CalData',
'Antenna',
'Subscan',
'SwitchCycle',
'Polarization',
'Source',
'State',
'Station',
'Main',
'Flag',
'ExecBlock',
'SBSummary',
'ConfigDescription',
'Receiver',
'Processor',
'CorrelatorMode',
'Feed',
'PointingModel',
'Field',
'Scan',
'CalDevice',
'Weather',
'CalReduction',
'DataDescription']
In [4]: s['Field'][0].keys
Out[4]:
['code',
'referenceDir',
'phaseDir',
'sourceId',
'delayDir',
'fieldName',
'time',
'fieldId',
'numPoly']
In [5]: s['Field'][0].fieldName
Out[5]: 'J1728+0427'
In [6]: for row in s['Field']: print row.fieldName
J1728+0427
J1713+0747
J1924-2914
J1909-3744
1411+522=3C295
In [7]: len(s['Main'])
Out[7]: 24
Simple classes for reading VLA/ALMA Science Data Model (SDM) XML
files. The structure of the SDM is a set of tables, which contain
rows of data. The main goal of this is to have a straightforward,
relatively dependency-free way of doing simple or low-level stuff with
SDMs (e.g., for situations where invoking CASA is unnecessary).
Here is a short ipython session showing a example usage:
In [1]: import sdmpy
In [2]: s = sdmpy.SDM('15A-105_sb30463808_1.57082.53091797454')
In [3]: s.tables
Out[3]:
['SpectralWindow',
'CalData',
'Antenna',
'Subscan',
'SwitchCycle',
'Polarization',
'Source',
'State',
'Station',
'Main',
'Flag',
'ExecBlock',
'SBSummary',
'ConfigDescription',
'Receiver',
'Processor',
'CorrelatorMode',
'Feed',
'PointingModel',
'Field',
'Scan',
'CalDevice',
'Weather',
'CalReduction',
'DataDescription']
In [4]: s['Field'][0].keys
Out[4]:
['code',
'referenceDir',
'phaseDir',
'sourceId',
'delayDir',
'fieldName',
'time',
'fieldId',
'numPoly']
In [5]: s['Field'][0].fieldName
Out[5]: 'J1728+0427'
In [6]: for row in s['Field']: print row.fieldName
J1728+0427
J1713+0747
J1924-2914
J1909-3744
1411+522=3C295
In [7]: len(s['Main'])
Out[7]: 24
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sdmpy-1.2.tar.gz
(2.5 kB
view hashes)
Built Distribution
sdmpy-1.2.linux-x86_64.tar.gz
(3.5 kB
view hashes)