process-2spec constructs a script for processing a set of 2-dimensional spectra. The script is in the form of a standard UNIX makefile, which is executed with the UNIX command make.
USAGE | process-2spec [spectrum-set]
| ||
INPUT | optional spectrum-set
| ||
OUTPUT |
| ||
PARAMETERS | none |
process-2spec allows one to pipeline most of the processes needed to construct a 2-d spectrum file from a set of observations. One must start with:
process-2spec Spectrum set: Mymask_night1 Associated obsdef file: Mymask Bad pixel file: mybadfile File prefix: "ccd" or "ift" Science frame(CR=>done) 005 Bias frame: bias Comparison arcs: 003 007 Flat frames: 004 006 Science frame(CR=>done) 007 Bias frame: bias Compairson arcs: 009 Flat frames: 006 008 Science frame(CR=>done)
process-2spec has the following restrictions on input:
Mymask_night1.make
. It is run with the standard UNIX make command:
make -f Mymask_night1.makeThe outcome of this operation will be a combined 2-d spectrum file named Mymask_night1_2spec.fits
process-2spec also creates a file named, in this example, Mymask_night1.pset which contains all of the information input when the program was run. Invoking process-2spec with the name of this file creates a makefile without the need to reenter the information. The pset file is a text file which can be edited to correct mistakes or add additional data.
make is a program which is handy when some files need to be made out of other files. It's usual application is in program development: object files need to be made out of source files, executables out of object files and libraries, etc. In COSMOS, map files need to be made out of obsdef and arc image files, _s files out of map files and object image files, etc.
The handy thing about make is that it never wastes effort: it understands which
files are the products of which other files, and only remakes the former if the
latter have changed. Thus, if one runs make on Mymask_night1.make
for the
first time. all of the programs are executed. However, if one immediately
reruns make, it will respond:
make 'Mymask_night1_2spec.fits' is up to dateIf, now, one changed one or more of the input files, most likely one of the parameter files for the programs, but possibly some image file as well, make will rerun only those parts of the script which depend on the changed file.
If all goes well, the screen output of make will be identical to what would be seen if all of the programs were run manually. If there is an error in one of the programs, make will quit at that point. If make cannot find one of the files that is required to process the data, it will also quit, with the following strange-sounding complaint:
make: *** No rule to make target `somefile', needed by `anotherfile'. Stop.where somefile is the missing file, and anotherfile is the output file of one of the programs. In this case, check to see why somefile is missing.