imageRegister

Return to directory of Todd's CASA extensions

Runs imfit on a list of star positions in two images of the same field and determines the median pixel shift (in the badImage) that will bring them into alignment.

Usage:

au.imageRegister(goodImage, badImage, goodStars, badStars=[], fitradius=10, residual=None, 
             model=None, logfile=None, includepix=[], excludepix=[], estimates='', 
             runImshift=False)
Inputs:
  • goodImage: a CASA image with good astrometry
  • badImage: a CASA image with bad astrometery
  • goodStars: a list of RA/Dec strings in J2000, e.g. ['17h45m32.0s +14.15.46.45']
  • badStars: only need this to specify counterparts if the astrometry is way off
  • fitradius: half the size of the box region to use (value in arcsec)
  • runImshift: if True, then run au.imshift on the badImage to create badImage.imshift
  • residual, model, logfile, includepixe, excludepix, estimates: passed to imfit (probably only useful for a fitting a single star at a time) Returns:
  • The median shift to be applied in RA and Dec (in units of pixels in badImage).

Example:

CASA <2>: au.imageRegister('sdss-red.image','F110W.image',['09:03:12.377 +00.39.08.416','09:03:10.408 +00:39:10.009','09:03:11.598 +00:39:06.723','09:03:13.039 +00.38.55.644','09:03:12.149 +00.38.51.983'],fitradius=3)
 goodImage fitted position       badImage fitted position    offsetArcsec(rao,deco)   offsets(pixels_in_bad_image)
09:03:12.3722799 +000:39:08.56051668   09:03:12.3966767 +000:39:08.77718569   -0.365928 -0.216669   +2.853402 -1.689522
09:03:10.3851455 +000:39:09.75635566   09:03:10.4061071 +000:39:09.96511174   -0.314404 -0.208756   +2.451628 -1.627819
09:03:11.5730003 +000:39:06.50130148   09:03:11.5966499 +000:39:06.72319910   -0.354721 -0.221898   +2.766011 -1.730293
09:03:13.0008275 +000:38:55.37247156   09:03:13.0387973 +000:38:55.62397168   -0.569510 -0.251500   +4.440877 -1.961125
09:03:12.1305883 +000:38:51.81349877   09:03:12.1534777 +000:38:52.03506121   -0.343319 -0.221562   +2.677102 -1.727679
  Out[2]: (2.7660113715700496, -1.7276793706931242)
-- ToddHunter - 2014-10-27
Topic revision: r2 - 2015-03-04, 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