User Tools

Site Tools


kuiper:link_to_the_instructions

Postprocessing with Watcher and Merge4k

Watcher is a script that automatically converts each incoming Extended FITS images from bigccd into a normal FITS image on Gerard, using merge4k, then displays the newly merged fits image in the ds9 window. After the image is displayed, watcher can also optionally execute any other script that the observer wishes to run.

(Note that the previous quicklook display had fatal bugs, so it is currently turned off by default at startup; you can also turn it off by typing “quicklook off” in any window.)

In order to make watcher more robust - so it doesn't crash due to interference with processes in other windows, misses fewer incoming images, etc - a watcher subdirectory has been created with its own separate uparm directory.

To start watcher correctly, open a terminal window, and type

./watcher_window

This will pop up a new IRAF window that is already cd'ed to the watcher subdirectory. In this window, the tasks and definitions that watcher needs are already loaded.

lpar watcher

If you don't want to run an optional script, either epar watcher to set extras=“”, or else type

watcher.extra=“”

If you're doing light curves, you should set extras = auto_plot

You can either cd to your data directory first (the same directory where bigccd will send the images ) and type

watcher .

Or just type watcher

and it will request the name of your data directory. You may specify the directory names in full, or relative to /home/bigobs (e.g. “sdb/15mar11/hwvir.raw”) or relative to your current directory (e.g. “.” or “../16mar11”/pg1336.raw).

Watcher will announce “watcher started”. Then it will sit and wait for a new image to be transferred to Gerard, whereupon it will run merge4k on that image. Merge4k converts/combines the raw Extended FITS images into a normal single FITS image, after first correcting each side separately for the crosstalk and for the overscan regions. The original Extended FITS image is saved in a subdirectory named “raw”, and the merged image is renamed to have the same name in the original directory. When mere4k is completed for that image, the watcher script will display the image in the ds9 window, optionally run the requested extra script, then start watching for the next image.

It is useful to reduce the watcher window to a few lines in height and place it under the ds9 image, so that you can see what it's doing as it detects, converts, and displays your images.

If you need to stop watcher, type control-c in the watcher window, followed by a flpr or two.

Merge4k was written to work properly with images of arbitrary numbers of columns and rows and binning; it reads the header and works with whatever image size and binning exist.

⇒ Until the version of IRAF running on Gerard gets updated, you will see that 3×3 binned images are 1365 pixels in the x direction instead of 1364; there is an extra (junk) column on the far right

Every now and then, watcher will miss an image. You can discover whether this has happened to any of your images by typing:

imhead *.fits | grep FX

Any unmerged or improperly merged images give an error that looks like: <image_name>:FXF: must specify which FITS extension (<image_name>) All you have to do is to run merge4k on the images manually, eg:

merge4k <image_name>

Merge4k can be run in any IRAF window (where tasks can be loaded).

If you find an image that is damaged or unreadable, first check to see if the original image made it to the raw subdirectory:

dir raw/<image_name>

If it is there, you can almost always successfully reprocess that image by moving the raw image to the observing directory and reprocessing it.

del <image_name> rename raw/<image_name> . merge4k <image_name>

kuiper/link_to_the_instructions.txt · Last modified: 2017/12/01 12:47 by mel