NRAO Home > CASA > CASA Toolkit Reference Manual

1.3.2 msmetadata - Tool

Operations to retrieve metadata from a measurment set
Requires:

Synopsis



Description

The msmd tool provides methods to retrieve metadata from measurement sets.

Attaching to a Measurement Set

The simplest and most common way to attach an msmd tool to a measurement set is to use the msmd.open method which requires that you specify the name of the measurement set table.

NOTE: Any modifications to an MS while an associated msmd tool is open will not be reflected in the msmd tool. You must close and reopen the tool if you want to capture changes made to metadata of an MS if such a change occurs.

Example:  
 
msmd.open("3C273XC1.MS")  
# get the number of spectral windows  
nspw = msmd.nspw()  
msmd.done()

We open the tool by querying the MS for its metadata. We then get the number of spectral windows in the dataset and close the tool.

Methods

??Get a list of spectral window IDs with ALMA-specific attributes.
??Get the diameter for the specified antenna.
??Get the zero-based antenna ID for the specfied antenna name.
??Get the names of the antennas for the specfied zero-based antenna IDs.
??Get the offset position of the specified antenna relative to the array reference position.
??Get the position of the specified antenna.
??Get the station names of the specified antennas.
??Get an array of the unique antenna IDs for the specified scan, obsservation ID, and array ID.
??Get the bandwidths in Hz for the specified spectral windows. If spw less than zero, return bandwidths for all spectral windows.
??Get the baseband for the specified spectral window.
??Get a two dimensional boolean array representing baselines for data recorded in the MS.
??Get an array of spectral window IDs used for channel averages. These are windows that do have 1 channel.
??Get an array of channel effective bandwidths for the specified spectral window.
??Get an array of channel frequencies for the specified spectral window.
??Get an array of channel resolutions for the specified spectral window.
??Get an array of channel widths for the specified spectral window.
??Close this tool and reclaim system resources associated with it.
??Get the correlation products associated with the specified polarization ID
??Get the correlation types associated with the specified polarization ID
??Get the data description IDs associated with the specified spectral window and/or polarization ID
??Close this tool and reclaim system resources associated with it.
??Get the effective exposure (on-source integration time)
??Get the exposure time for the specified scan, spwid, polarizaiton ID, array ID, and observation ID.
??Get an array of spectral window IDs used for FDM. These are windows that do not have 64, 128, or 256 channels.
??Get an array of field names as they appear in the FIELD table.
??Get an array of the unique fields for the specified intent.
??Get an array of the unique, zero-based field IDs for the specified field name.
??Get an array of the unique fields for the specified scan number, observation ID, and array ID.
??Get an array or dictionary of the unique fields for the specified scan numbers, observationID, and array ID.
??Get an array of the unique fields for the specified source ID.
??Get a map of source IDs to fields.
??Get an array of the unique fields for the specified spectral window.
??Get an array of the unique, zero-based, field IDs for the specified time range (time-tol to time+tol).
??Get an array of the unique intents associated with the MS.
??Get an array of the unique intents for the specified field.
??Get an array of the unique intents for the specified scan, obsservation ID, and array ID.
??Get an array of the unique intents for the specified spectral window ID.
??Get the mean frequency for the specified spectral window.
??Get the name of the attached MS.
??Get the number of antennas associated with the MS.
??Get the name of the specified field.
??Get the name of the specified spws.
??Get the number of baselines represented in the main MS table.
??Get the number of channels associated with the specified spectral window.
??Get the number of correlations for the specified polarization ID.
??Get the number of fields associated with the MS.
??Get the number of observations associated with the MS from the OBSERVATIONS table.
??Get the number of spectral windows associated with the MS.
??Get the number of states (from the STATE table) associated with the MS.
??Get the number of scans associated with the MS.
??Get the number of unique values from the SOURCE_ID column in the SOURCE table.
??Get the number of visibilities (from the main table) associated with the MS.
??Get an array observers as they are listed in the OBSERVATIONS table.
??Get an array of MS telescope (observatory) names as they are listed in the OBSERVATIONS table.
??Get the position of the specified telescope.
??Attach the MS metadata tool to the specified MS
??Get the phasecenter direction from a field ID and time if necessary
??Get the pointing direction for antennas at the specified row number in the main MS table.
??Get the polarization ID associated with the specified data description ID.
??Get an array projects as they are listed in the OBSERVATIONS table.
??Get the values of the PROPER_MOTION column from the SOURCE table.
??Get the reference direction from a field ID and time if necessary
??Get the reference frequency of the specified spectral window.
??Get the rest frequencies from the SOURCE table for the specified source and spectral window.
??Get an array of the unique scan numbers associated with the MS for the specified observation ID and array ID.
??Get an array of the unique scan numbers associated with the specified field, observation ID, and array ID.
??Get a dictionary of which maps field ID to scan numbers for the specified observation ID and array ID.
??Get an array of the unique scan numbers associated with the specified intent, observation ID, and arrayID.
??Get an array of the unique scan numbers associated with the specified zero-based spectral window ID, observation ID, and array ID.
??Get a dictionary of which maps spw ID to scan numbers for the specified observation ID and array ID.
??Get an array of the unique scan numbers for the specified state, observation ID, and array ID.
??Get an array of the unique scan numbers for the specified time range (time-tol to time+tol), observation ID, and array ID.
??Get the schedule information for the specified observation ID.
??Get the sideband for the specified spectral window.
??Get the values of the DIRECTION column from the SOURCE table.
??Get the source ID from the field table for the specified field ID.
??Get the values of the SOURCE_ID column from the SOURCE table.
??Get the values of the SOURCE_NAME column from the SOURCE table.
??Get the spws associated with the specified baseband or dictionary that maps baseband to spws.
??Get the spectral window ID associated with the specified data description ID.
??Get an array of the unique spectral window IDs for the specified field.
??Get a dictionary which maps field IDs to spectral window IDs.
??Get an array of the unique spectral window IDs for the specified intent.
??Get the IDs of the specified spw names.
??Get an array of the unique spectral window IDs for the specified scan number, observation ID, and array ID.
??Get a dictionary of which maps scan number to spectral windows for the specified observation ID and array ID.
??Get an array of the unique state IDs for the specified scan number, observation ID, and array ID.
??Get a dictionary which maps scan numbers to state IDs for the specified array and observation IDs.
??Get dictionary summarizing the MS.
??Get an array of spectral window IDs used for TDM. These are windows that have 64, 128, or 256 channels.
??Get the time range for the specified observation ID
??Get an array of the unique times for the specified field.
??Get an array of the unique times for the specified intent.
??Get the unique times for the specified scan number, observation ID, and array ID.
??Get an array of the unique times for the specified scan numbers, observation ID, and array ID.
??Get the spectral transitions from the SOURCE table for the specified source and spectral window.
??Get an array of spectral window IDs used for WVR. These are windows that have 4 channels.

    msmetadata.almaspws - Function
    msmetadata.antennadiameter - Function
    msmetadata.antennaids - Function
    msmetadata.antennanames - Function
    msmetadata.antennaoffset - Function
    msmetadata.antennaposition - Function
    msmetadata.antennastations - Function
    msmetadata.antennasforscan - Function
    msmetadata.bandwidths - Function
    msmetadata.baseband - Function
    msmetadata.baselines - Function
    msmetadata.chanavgspws - Function
    msmetadata.chaneffbws - Function
    msmetadata.chanfreqs - Function
    msmetadata.chanres - Function
    msmetadata.chanwidths - Function
    msmetadata.close - Function
    msmetadata.corrprodsforpol - Function
    msmetadata.corrtypesforpol - Function
    msmetadata.datadescids - Function
    msmetadata.done - Function
    msmetadata.effexposuretime - Function
    msmetadata.exposuretime - Function
    msmetadata.fdmspws - Function
    msmetadata.fieldnames - Function
    msmetadata.fieldsforintent - Function
    msmetadata.fieldsforname - Function
    msmetadata.fieldsforscan - Function
    msmetadata.fieldsforscans - Function
    msmetadata.fieldsforsource - Function
    msmetadata.fieldsforsources - Function
    msmetadata.fieldsforspw - Function
    msmetadata.fieldsfortimes - Function
    msmetadata.intents - Function
    msmetadata.intentsforfield - Function
    msmetadata.intentsforscan - Function
    msmetadata.intentsforspw - Function
    msmetadata.meanfreq - Function
    msmetadata.name - Function
    msmetadata.nantennas - Function
    msmetadata.namesforfields - Function
    msmetadata.namesforspws - Function
    msmetadata.nbaselines - Function
    msmetadata.nchan - Function
    msmetadata.ncorrforpol - Function
    msmetadata.nfields - Function
    msmetadata.nobservations - Function
    msmetadata.nspw - Function
    msmetadata.nstates - Function
    msmetadata.nscans - Function
    msmetadata.nsources - Function
    msmetadata.nrows - Function
    msmetadata.observers - Function
    msmetadata.observatorynames - Function
    msmetadata.observatoryposition - Function
    msmetadata.open - Function
    msmetadata.phasecenter - Function
    msmetadata.pointingdirection - Function
    msmetadata.polidfordatadesc - Function
    msmetadata.projects - Function
    msmetadata.propermotions - Function
    msmetadata.refdir - Function
    msmetadata.reffreq - Function
    msmetadata.restfreqs - Function
    msmetadata.scannumbers - Function
    msmetadata.scansforfield - Function
    msmetadata.scansforfields - Function
    msmetadata.scansforintent - Function
    msmetadata.scansforspw - Function
    msmetadata.scansforspws - Function
    msmetadata.scansforstate - Function
    msmetadata.scansfortimes - Function
    msmetadata.schedule - Function
    msmetadata.sideband - Function
    msmetadata.sourcedirs - Function
    msmetadata.sourceidforfield - Function
    msmetadata.sourceidsfromsourcetable - Function
    msmetadata.sourcenames - Function
    msmetadata.spwsforbaseband - Function
    msmetadata.spwfordatadesc - Function
    msmetadata.spwsforfield - Function
    msmetadata.spwsforfields - Function
    msmetadata.spwsforintent - Function
    msmetadata.spwsfornames - Function
    msmetadata.spwsforscan - Function
    msmetadata.spwsforscans - Function
    msmetadata.statesforscan - Function
    msmetadata.statesforscans - Function
    msmetadata.summary - Function
    msmetadata.tdmspws - Function
    msmetadata.timerangeforobs - Function
    msmetadata.timesforfield - Function
    msmetadata.timesforintent - Function
    msmetadata.timesforscan - Function
    msmetadata.timesforscans - Function
    msmetadata.transitions - Function
    msmetadata.wvrspws - Function


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search