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

1.3.2 Get an array of the unique fields for the specified spectral window.


Description

Get an array of the unique fields for the specified spectral window.

Arguments





Inputs

spw

Zero-based spectral window ID 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

Returns
any

Example

 
    msmd.open("my.ms")  
    # get the field names for spectral window 1  
    field_names = msmd.fieldsforspw(1, True)  
    # get the field IDs for spectral window 1  
    field_IDs = msmd.fieldsforspw(1, 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