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

1.3.2 Get an array of the unique fields for the specified source ID.


Description

Get an array of the unique fields for the specified source.

Arguments





Inputs

source

Zero-based source 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 source ID 1  
    field_names = msmd.fieldsforsource(1, True)  
    # get the field IDs for source ID 1  
    field_IDs = msmd.fieldsforsource(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