spwsForFields

Return to directory of Todd's CASA extensions

The CASA msmd tool method msmd.spwsforfield() only support single fields. This function supports field lists by calling it successively for each field and returning the union. See also spwsForScan.

Usage:

au.spwsForFields(mymsmd, fields. matchByName=False)
  • mymsmd: an msmd tool instance
  • fields: a list of integer field IDs
  • matchByName: if True, then translate fields IDs to names, then request all field IDs that match each name, which is helpful for the case that the Tsys scan is taken on a different field number from the observe_target scans.

Example:

CASA <3>: msmd.open('uid___A002_X84187d_X1a59.ms')
  Out[3]: True
CASA <4>: au.spwsForFields(msmd,[0,1])
  Out[4]: 
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
       17, 18, 19, 20, 21, 22, 23], dtype=int32)

-- ToddHunter - 2014-09-18
Topic revision: r2 - 2014-09-19, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback