HIRedux Setup
Organize and Compress the Data
- Create a new directory for the night (e.g. 08sep04) and enter it
- Create a 'Raw/' directory and put all the raw data in it.
- gzip the data as necessary
unix> gzip *.fits
- Launch idl in the directory above Raw/
unix> idl -32 (or idlde -32)
Create/Edit the Structure
- hires_strct :: Create the HIRES structure.
- This structure organizes
the entire night of data and is the most important file created.
- The routine creates a few things:
- An IDL structure in memory with whatever name you choose (e.g. hires).
Here is a copy of the file which
defines the structure and lists the tags.
- The file 'hiresstrct.fits' which is a fits
version of the structure;
- The file 'hires.list' which is an ASCII
version of the fits file which lists the values of some of the tags.
- If you run with /EDIT the program will launch a
gui which allows some editing of the hires structure
(see next step).
We recommend you use an IDL script to do the
editing. It will save time if you have to start over from scratch
and
it gives a permanent record of what you changed.
Example: IDL> hires_strct, hires, [/EDIT]
Time : <1s per image
- You know the code is working properly when:
- It runs through the completion after checking each Raw file
- The majority of files are correctly identified by type. Note the
code will not get them all right all of the time. We typically create
a script like this one to set a number of the tags.
- Recommended: Edit the structure with a script
hires_strct creates the structure and takes a guess at the
initial values of many of the tags based on the header card info. It
is difficult, however, to automate all of the values for the tags and
therefore the user should carefully check the structure. Also, the
user should set flg_anly = 0 for all of images which should
be ignored during data reduction (bad flats, tests, etc.). For most of
the important tags, one can use hires_editstrct. The rest must
be done from the command line by hand or through a simple
IDL script (recommended). The obvious tags to modify are:
- hires_editstrct
:: Modify the HIRES structure. See above
- Obj :: Object name (this propagates into the final spectra
and should have no spaces!)
- flg_anly :: Include in analysis (defaulted to 1 for yes)
- type :: ARC, TFLT, MFLT, TWI, OBJ, STD, ZRO, etc.
- setup :: 1L, 2L, etc. (unique integer for each instrument
setup including slit width)
Example: IDL> hires_editstrct, hires
Time : User interaction
Example: IDL> set_crds, hires
(see doc/set_crds.pro for an example)
- You know the code is working right when the GUI appears.
- hires_updstrct
:: Append new files to the current structure.
This is mainly useful at the telescope as you are taking new data.
The code simply searches the Raw directory, notes any new files,
and adds them to the structure.
Example: IDL> hires_updstrct, hires
Time : Fast
- You know the code is working right when it finds the files.
- hires_wrstrct ::
Write the HIRES structure to disk. In IDL you can modify the values
of any of the tags. You can then save the structure in fits form and
rewrite the ASCII file with the routine hires_wrstrct.
Example: IDL> hires_wrstrct, hires, FITS='hires_name.fits'
Time : fast
- If you exit (or crash) IDL, you will need to read the structure back in.
hires_ar ::
Read the HIRES structure from disk.
If no name is given, the file looks for the first fits
file starting 'hires' that contains a '_'.
Example: IDL> hires = hires_ar()
Example: IDL> hires = hires_ar('hires_name.fits')
Time : fast
- You know the code is working right when
IDL> help, hires, /str ---- lists the structure.
Setup
- A unique setup is defined by the slit width, the binning, the
angles of the echelle and cross-disperser, the blocking filter, and the
cross-dispersor (UV or RED).
Obviously, each setup requires its own set of calibration files.
- It is important to make sure the objects are properly named
at this point. At the least, multiple exposures of the same object
should have identical object name (tag: hires.obj).
- hires_setup ::
This routine examines the hires structure and looks for calibration
files associated with the various setups.
It groups together exposures with identical Obj name (hires.obj) and
sets the obj_id tags accordingly.
A list of the setups and the corresponding files is put
in 'hires_summ.txt'. See 'setup_summ.txt' for a very brief
listing.
- Note: With v2.0 it is highly recommended that you only run this
program once. The calibration files produced by the pipeline have the
setup# as a tag and rerunning hires_setup could compromise things.
Example: IDL> hires_setup, hires
Time : Fast
- You know the code is working right when you
check the output file 'hires_summ.txt' and everything is
properly setup. Modify the obj_id and other tags and rerun
hires_setup as necessary.
- Perhaps the main failure mode of this routine is when the cross-disperser
angle floats between exposures. Right now the default tolerance is 0.0015
for the angle. So if your exposures differ by more than this, the code will
assign unique setup values. You can override this limit by increasing the
XTOLER parameter.
Last modified 2005-10-10