NRAO Home > CASA > CASA Toolkit Reference Manual
msmetadata.fieldsforscan - Function

1.3.2 Get an array of the unique fields for the specified scan number, observation ID, and array ID.


Description

Get an array of the unique fields for the specified scan number, observation ID, and array ID.

Arguments





Inputs

scan

Scan number for which to return the fields.

allowed:

int

Default:

-1

asnames

If true, return the field names. If false, return the zero-based field IDs.

allowed:

bool

Default:

false

obsid

Observation ID. A negative value means use all observation IDs.

allowed:

int

Default:

-1

arrayid

Array ID. A negative value means use all array IDs.

allowed:

int

Default:

-1

Returns
any

Example

 
    msmd.open("my.ms")  
    # get the field names for scan number 5 (for all array IDs and all observation IDs).  
    field_names = msmd.fieldsforscan(5, True)  
    # get the field IDs for scan number 5 (for all array IDs and all observation IDs)  
    field_IDs = msmd.fieldsforscan(5, False)  
    msmd.done()  

__________________________________________________________________


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