getRADecForField

Return to directory of Todd's CASA extensions

Returns the [[RA],[Dec]] in radians for the specified field in the specified ms. If run in casa >= 4.2.0, it will (by default) use ms.getfielddirmeas(), instead of reading the DELAY_DIR field of the ms directly. This will return the correct RA, Dec position for ephemeris targets when there is an ephemeris attached (as the DELAY_DIR will remain 0,0 in this case). See also getRADecStringForField.

Usage:

au.getRADecForField(ms, myfieldId, usemstool=True, forcePositiveRA=False, verbose=False, blendByName=True)
Inputs:
  • field: ID or name
  • usemstool: if True, use ms.getfielddirmeas; otherwise use tb.getcell from FIELD table
  • blendByName: if True, convert field IDs to name, and then back to ID, which will increase the number of fields, e.g. for mosaics

Examples:

CASA <3>: au.getRADecForField('uid___A002_X6a8ffb_X25c.ms',1)
  Out[3]: 
array([[-1.48842406],
       [-0.24148085]])

CASA <2>: au.getRADecForField('uid___A002_X6a8ffb_X25c.ms',1,forcePositiveRA=True)
  Out[2]: 
array([[ 4.79476125],
       [-0.24148085]])

-- ToddHunter - 2013-09-27
Topic revision: r6 - 2016-02-01, 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