Loading...
 

There is quite a bit of existing information on the NIRC2 Astrometry Page giving the best published NIRC2 distortion solution and an IDL program to apply the distortion solution to NIRC2 images. However, an alternative method for correcting NIRC2's distortion uses the IRAF/PyRAF routine Drizzle to simultaneously correct the distortion and to combine individual exposures.

Drizzling NIRC2 images:

  • notes from Jessica Lu
  • also see Yelda et al. 2010 and the related website and J. R. Lu's thesis (2009, UCLA, Ch. 4 PDF) for further details


The most recent NIRC2 narrow camera distortion solution is presented in Yelda et al. 2010 and is given as two FITS files with X and Y offsets for each NIRC2 pixel. Drizzle takes these files as inputs into the xgeoim and ygeoim keywords. It should be noted that this new distortion solution assumes that differential atmospheric refraction will also be corrected.

In python:

from pyraf import iraf as ir

ir.module.load('stsdas', doprint=0, hush=1)
ir.module.load('analysis', doprint=0, hush=1)
ir.module.load('dither', doprint=0, hush=1)
ir.unlearn('drizzle')

# These parameters change for each image
ir.drizzle.in_mask = 'nirc2_image_mask.fits'

# Some common parameters for NIRC2
ir.drizzle.wt_scl = 1
ir.drizzle.pixfrac = 1
ir.drizzle.kernel = 'lanczos3'
ir.drizzle.scale = 1
ir.drizzle.shft_un = 'input'
ir.drizzle.shft_fr = 'output'
ir.drizzle.align = 'center'
ir.drizzle.expkey = 'ITIME'
ir.drizzle.in_un = 'counts'
ir.drizzle.out_un = 'counts'
ir.drizzle.outcont = ''
ir.drizzle.fillval = 0.0

# Set the distortion coeffecients file
ir.drizzle.xgeoim = 'nirc2_X_distortion.fits'
ir.drizzle.ygeoim = 'nirc2_Y_distortion.fits'

# Info on the output images.
ir.drizzle.outweig = 'final_image_wgt.fits'
ir.drizzle.outnx = final_image_size
ir.drizzle.outny = final_image_size

# Do the drizzling... this should be in a for loop over 
# all your NIRC2 images that go into the mosaic.
ir.drizzle('nirc2_image.fits', 'final_image.fits', xsh=xshift, ysh=yshift)


Page last modified on Monday 04 of October, 2010 23:38:38 EDT