process-2spec

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
INPUT
none
OUTPUT
spectrum-set.make
PARAMETERS
none



Details:

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:
On being invoked, process-2spec prompts for the needed information:

process-2spec


Spectrum set:  Mymask_night1
Associated obsdef file: Mymask


Science frame(CR=>done)
005
    Bias frame: bias
    Flat frames:  003
    Comparison arcs: 004 006


Science frame(CR=>done)
007
    Bias frame:  bias
    Flat frames: 009
    Comparison arcs: 006 008


Science frame(CR=>done)


process-2spec has the following restrictions on input:
in addition, process-2spec requires the following:

process-2spec constructs a script to run the following programs on the data set:
The output of the above invocation of process-2spec is a makefile called Mymask_night1.make. It is run with the standard UNIX make command:

make -f Mymask_night1.make

The outcome of this operation will be a combined 2-d spectrum file named Mymask_night1_2spec.fits

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 date

If, 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.