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

1.3.2 Get an array of the unique fields for the specified intent.


Description

Get an array of the unique fields for the specified intent. Note that * matches any number of characters of all character classes.

Arguments





Inputs

intent

Intent (case sensitive) for which to return the fields.

allowed:

string

Default:

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 intent "observe target"  
    field_names = msmd.fieldsforintent("observe target", True, regex=False)  
    # get the field IDs for intent "observe target"  
    field_IDs = msmd.fieldsforintent("observe target", False, regex=False)  
    # get all field IDs for all intents which contain ’WVR’  
    field_IDs = msmd.fieldsforIntent("*WVR*")  
    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