Usage of FixPosition class

Return to directory of Todd's CASA extensions

FixPosition is a class with various methods to fix problems with the direction of sources in an ms. It was written back in 2011 during Cycle 0. Some of it is superceded by fixplanets in casa. In a related note, my old tests of polynomial ephemerides in casa can be found here.

Some problems that the methods in this class can deal with

  • Problem 0: You have two observations of the same source but it does not appear at the same RA/Dec, but you want to force it to do so.
  • Problem 1: ALMA control system writes the J2000 epoch 2000 coordinates to the header rather than the J2000 current epoch coordinates. Use setDirectionFromProperMotion to change to current epoch coordinates.
  • Problem 2: Planets have position (0,0) in Cycle 0 data. You can now use the fixplanets task in casa, but before that, you could use either of the following to write a real position:
    • doRADecJ2000FromJPL
    • doRADecJ2000FromAntenna

Usage for problem 0:

fp.setDirectionFromRADec(field, raString, decString):
Inputs:
  • field: field ID integer
  • raString: new RA in format: 'hh:mm:ss.sssss'
  • decString: new Dec in format: '+dd:mm:ss.ssss'
Results:
  • Say you have a point source that appears in the image at its catalog position, and you set a new position using this method. In the next image you make from that dataset, it will appear at the new position.

Example for problem 0:

CASA <2>: import analysisUtils as au
CASA <3>: fp = au.FixPosition('uid___A002_X99c183_X25b6.ms.split')  # instantiates the class for the specified measurement set
CASA <4>: fp.setDirectionFromRADec(3,  '12:29:27.3933', '-60:03:40.0174')
New direction: 12.49094258333,-60.06111594444deg = 12:29:27.393,-60:03:40.0174
             = 3.2701211213510,-1.0482642256526 radian
Changed 1 positions in FIELD table.
CASA <5>:
field3.image.subimage.png field3 aftershift.image.subimage.png

Problem 1

fp.getDirectionFromProperMotion(field,years=0)
  • Finds the first occurrence of the field name (or ID) and then use its position and proper motion to compute a new direction, and return it.
  • Letting years=0 means to start at J2000 and come forward.
   
fp.setDirectionFromProperMotion(field,years=0)
  • Calls getDirectionFromProperMotion and then updates the ms with the new position

Problem 2

fp.doRADecJ2000FromAntenna(self,field,set=0,ant=0,timestamp=0)
  • Computes the mean RA/Dec in J2000 coordinates for the specified field string by using the azim/elev pointing of the specified antenna and stuffs this into the FIELD tables.
  • This is the equivalent of something Dirk wrote independently, and in any case should be superceded by the method: doRADecJ2000FromJPL() which uses polynomials.
fp.doRADecJ2000FromJPL(field)
  • Contacts JPL Horizons via the telnet interface, gets the position and derivative for the mean time of observation, and stuffs them into the FIELD table of the ms.
  • At present, this function can only accept a single field

-- ToddHunter - 2011-10-07
Topic revision: r5 - 2016-01-29, 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