Using the Dewarp

Log in and do everything as deep. When you run IRAF (by using "cl"), run it from the /home/astro10/deep/rknop directory. (Notice that there is both a deep and a rknop in that directory.) I've set up the scripts so that that IRAF account will work right with the undistort software. It may work elsewhere as well. Who knows.

Run it on cha-am or panisse, or a machine on which you are sure we've set up IRAF correctly.

BTC distortion files are in /home/astro23/deepsearch/rknop/btcdistort. The files you need are rknopundistort.csh, process_header, and geomap_newest. Copy those to your working directory.

Copy the FITS files to your current directory
Rotate the FITS files properly
These procedures are done most easily within IDL. In IDL, cd to your working directory and do: That will write a copy of the FITS file, properly rotated, to your current directory. name is the name as found in our database of the image. rotnumber is 2 for BTC quadrants 1-3, and 5 for BTC quadrant 4.

Read the .fts files into IRAF
Use rfits. Write the .imh files to your current directory. The current directory should have space to deal with this sort of thing.

Make a list of the .imh files
In your current directory, do an "ls *.imh > rootlist".

Run rknopundistort.csh
Run this from a shell. Do not run it from within IRAF. It will take time. Several minutes per image to be undistorted, probably. When it's done, for each file.imh file you ran through the thing, there should be a ufile.imh file which is undistorted.

Write the undistorted files back to FITS.
Use wfits. Write 16-bit files. Choose your scaling intelligently. Note that autoscaling may not be a good idea because the spline fitting in the distortion routines can introduce huge swings in pixel value when there are saturated objects.

Properly rotate the undistorted FITS images back to how we keep them
Load the undistorted images into the database.
These steps are probably easiest done in IDL. Right now, loading the undistorted images into the database requires hand intervention, and you should consult Matthew for how it is done.

Matthew and I suggest a suffix "csw" and "cow" for the dewarped images, where a csw image is a dewarped csg image and a cow image is a dewarped com image.

Move the unwarped images where the database can find them.
Put them in one of the /home/astro*/deepsearch directories which has space.

Do subtractions, scanning, etc.


rknop@panisse.lbl.gov
Last modified: Sat Mar 8 17:09:53 1997