Search
Text Size:
Smaller Text Normal Text Larger Text

Facebook page

Twitter profile

YouTube channel

ALFOSC MOS: Guidelines for making a new distortion map

For the design of new MOS masks, the MOSPLATE software uses a transformation matrix to correct the image distortion between mask (telescope focal plane) and the detector (ALFOSC focal plane).

When optics or the detector in ALFOSC are changed, a new distortion map should be made. In order to make the distortion map one needs a rectangular/square grid of pinholes with 2.000mm spacing, made in an ordinary MOS plate. This grid plate should be made with the same CNC machine as that on which the science MOS plates will be cut.

The distortion maps are stored as IDL transformation matrices in files such as
    sandra:/home/mos/mosplate/coord_trfm/trfm/NAME_OF_CCD.trfm     or
    ${MOS_DIR}/etc/NAME_OF_CCD.trfm
so you can easily swap between transformations. Note that you have to update ${MOS_DIR}/etc/mosplate.par to make the software point at the correct transformation file.

Notes for MOSPLATE users are found below (at the bottom)

How does NOT staff make a new distortion transformation matrix?

To make a new transformation you have to do the following steps:
  1. Put in the grid mask, take out any filters inside ALFOSC, and make 3 images of the grid mask with dome lamps.
  2. Run DAOFIND or STARFIND on the images of the grid mask. (See below for details.)
  3. Copy these files to sandra:${MOS_DIR}/coord_trfm/input_coords, calling it something sensible like 'ALFOSC_NEW.coo'. Any empty lines in the file should be removed.
  4. Before running PIXEL2MM_FIT, update file
        sandra:${MOS_DIR}/etc/pixel2mm_fit.par    
    to correctly reflect the new instrumentation and grid pitch.
  5. Run the IDL programme PIXEL2MM_FIT, located in the directory ${MOS_DIR}/coord_trfm. Running this programme may require a bit of help from an experienced IDL user. There are some prompting for info which is commented out and substituted for hard-coded values first in the programme. You would like to hard-code something else or uncomment the prompting. But otherwise everything should be straight forward. (See below for details.)
    This creates a transformation matrix .trfm file in directory sandra:${MOS_DIR}/coord_trfm/trfm/
    Note: JHT runs PIXEL2MMJHT_FIT because it does not expect all gridpoints to be detected, and hence is less strict. (It now also contains a vital BUGFIX.)
  6. Verify the orientation of the transformation. If the CCD is read out in the same way as the previous one (north and east orientation the same as for the previous CCD, using the same sky position angle as before) it should be OK.
  7. Before running MOSPLATE, update file
        sandra:${MOS_DIR}/etc/mosplate.par    
    to correctly reflect the new instrumentation, and the whereabouts of the new transformation matrix.
  8. Let the users know that they have to update their MOSPLATE setup!!

About IRAF STARFIND

> images
> imcoords
> starfind jht00009 default 1.3 1000
> lpar starfind
image = "jht00009" Input image
output = "default" Output star list
hwhmpsf = 1.3 HWHM of the PSF in pixels
threshold = 1000. Detection threshold in ADU
(datamin = INDEF) Minimum good data value in ADU
(datamax = INDEF) Maximum good data value in ADU
(fradius = 2.5) Fitting radius in HWHM
(sepmin = 5.) Minimum separation in HWHM
(npixmin = 5) Minimum number of good pixels above background
(maglo = INDEF) Lower magnitude limit
(maghi = INDEF) Upper magnitude limit
(roundlo = 0.) Lower ellipticity limit
(roundhi = 0.3) Upper ellipticity limit
(sharplo = 0.2) Lower sharpness limit
(sharphi = 5.) Upper sharpness limit
(wcs = "") World coordinate system (logical,physical,world)
(wxformat = "") The x axis world coordinate format
(wyformat = "") The y axis world coordinate format
(boundary = "nearest") Boundary extension (nearest,constant,reflect,wrap)
(constant = 0.) Constant for constant boundary extension
(nxblock = INDEF) X dimension of working block size in pixels
(nyblock = 256) Y dimension of working block size in pixels
(verbose = no) Print messages about the progress of the task

The above creates a similar output as daofind, but is smart enough not to include any cosmics. However, not all pinholes are detected, but not all should be detected because some are clearly not very good. Tune the 'hwhmpsf' parameter to get best results.
Make sure to delete the empty lines from the output .obj file! Check the result on your image display with:
> tvmark radius=15 color=203

About running PIXEL2MM_FIT in IDL

On sandra as user mos:
  1. Edit sandra:${MOS_DIR}/etc/pixel2mm_fit.par    
    to correctly reflect the new detector size and the grid pitch.
  2. > cd mosplate/coord_trfm/
  3. start IDL:
    > idl
  4. IDL> .run pixel2mm_fitJHT
  5. IDL> pixel2mm_fit
    answer CCD-NAME (e.g CCD8) and then FILENAME (e.g. jht09.obj)
  6. Check the output with:
    IDL> restore, "trfm/CCD8.trfm"
    IDL> print, TRFM_COEF

About running MOSPLATE with the new transformation matrix

  1. Copy the new file transformation matrix to the directory
        ${MOS_DIR}/etc/    
  2. Update file
        ${MOS_DIR}/etc/mosplate.par    
    to correctly reflect the new instrumentation, and the whereabouts of the new transformation matrix.
  3. Follow the MOS User Manual to design new science masks.

I am a MOSPLATE user: what should I do?

  1. Get the latest distortion transformation matrix .trfm file.
  2. Copy the new file transformation matrix to the directory
        ${MOS_DIR}/etc/    
  3. Update file
        ${MOS_DIR}/etc/mosplate.par    
    to correctly reflect the new instrumentation, and the whereabouts of the new transformation matrix. The current version of mosplate.par at NOT looks like this.
  4. Follow the MOS User Manual to design new science masks.