How to make OTFs

 

Subject: Creating and Installing OTF Flat Fields
Date: Fri, 25 Aug 2000 10:23:26 -0700 (MST)
From: Frank Valdes 
To: mosaic-ccdATtucana.tuc.noao.edu, pmasseyATtucana.tuc.noao.edu

In response to a question from Phil I am posting an updated version of something I sent around last fall.

I post this here for anyone interested or who might need to create the OTF flats, and as a record of the process as currently performed. This was updated from the previous version dated "Oct 28, 1999" to include information about how to set things up for personal use during an observing run. The only problem is how observers can install the files for general
use. Right now the files are put in a system directory owned by IRAF. I am considering making the directories have world permissions but with all previously installed directories being protected.

This information will be available on-line with "help mscotfflat" after the next update of MSCRED.

Frank

Creating and Installing OTF Flat Fields
    Frank Valdes - Aug. 25, 2000

1. Take one or more flat fields. The count levels have to be below 30000. If not divide the values by a number either before or after processing using MSCARITH. Since the OTF flats are spatially binned and digitized to reduce size it probably is not very useful to create a high quality flat from multiple exposures, a single exposure should be fine.

2. Process the flat(s). The processing should be only overscan and trim. If combining multiple flats with FLATCOMBINE set the processing as noted. The processing should save the raw exposures in the Raw subdirectory (or whatever is set for the "backup" parameter in MSCRED).

3. Run MSCOTFFLAT with the default values. The output name must be one word (that is an acceptible directory name) and should be the standard identifier for the filter. Typically this would be the first word of the filter name recorded in the header (with any characters which are not letters, numbers, or '.' replaced with '_'). The template name is one of the raw exposures.

ms> mscotfflat flat001 B Raw/flat001

This will create a subdirectory, B in this example, with the number of pl files equal to the number of extensions.

3a. You can check if things make sense by the size of the pl files being approximately 0.6-1.6Mb. You can also display the files and compare with the original data using:

ms> display B/flat1 1 fill+ ...
ms> display flat00[1] 2 fill+ ...

They should be very similar to the flat from which they were derived.

4. To use during your run with the real-time DCA display you would set the calibration directory in the DCA GUI to point to the parent directory containing the subdirectories of pl files (the directory you were in when you ran MSCOTFFLAT). This is done from the "Edit" menu, selecting "Path Params", editing the "Calibration Dir" field, and finally clicking "Apply". Also if you are going to use MSCDISPLAY with "process=yes" then go to the "mimpars" parameters and set the "caldir" directory parameter there too. Remember that directories in IRAF must end with '/' (or '$' for logical directories).

If you do nothing else the software will look in the specified calibration directory for a subdirectory which matches the first word of the filter string in the image header (with any characters that are not letters, numbers, or '.' changed to '_'). If you want to translate the header filter name to some other (directory) name you can add a "cal.men" file where the first column is the filter name (quoted if there are blanks) and the second column is the directory name. This file is also used to set the override choices for the filter in the DCA GUI.

The following is done to install the OTF directory for general use and requires the IRAF login.

5. Login as IRAF and go to the standard calibration directory:

/iraf/extern/mscdb/noao/ctio/4meter/caldir/Mosaic2A # CTIO 4m (8 A amps)
/iraf/extern/mscdb/noao/ctio/4meter/caldir/Mosaic2B # CTIO 4m (8 B amps)
/iraf/extern/mscdb/noao/ctio/4meter/caldir/Mosaic2 # CTIO 4m (16 amps)
/iraf/extern/mscdb/noao/kpno/4meter/caldir # KPNO 4m
/iraf/extern/mscdb/noao/kpno/36inch/caldir # KPNO 36inch
/iraf/extern/mscdb/noao/kpno/wiyn/caldir # KPNO WIYN

Transfer the OTF directory to that calibration directory. One way is

% (cd /md1/4meter/nite1; wtar B) | rtar -xv

6. Edit the cal.men file. The first column is the filter name as given in the data files under the FILTER keyword. The second name is the directory name. The order of the entries in the order in which the filters will appear in the DCA list. Note the DCA list is only used to override the automatic filter selection based on the filter keyword.

7. Remove the OTF directory in your data area. One way is with "!rm -rf

". You can also restore the original raw flats for taping by moving the files from the Raw subdirectory back to the data directory.

8. I am maintaining a master MSCDB directory that includes current OTF flats. This serves the purpose of a backup, the  source to generate installation files, and the source to generate distribution files for users who might want them. So if you  create OTF files please notify me.

See also

ms> phelp mscotfflat