TRANSFORM all images to correct for distortion in sky line direction. You must have a file called called fccosmicdist in the database subdirectory of your working directory, that contains the distortion map for COSMIC.

Use GEOTRAN to correct slit tilt in dispersion direction. You need files called apinmap2.map and apinmap2.output (made by geomap) in your directory, plus a file called transf.in which just has apinmap2.output repeated as many times as there are images to transform.

Display an image with the object spectra, and measure the slit positions.
Make them a bit narrower than maximum if possible. Put the entries in a file called object.sec, with a format like:
[*,4:47] 1
[*,59:99] 2
etc.

Setup some parameters for IRAF tasks that will be used by slitredux:
Set xzap parameters as:

Next, we need to run IDENTIFY on all the processed arcs to map the dispersion solution. Note that I have a line list for the COSMIC 300l/mm grating HgAr arc in my scripts directory, called cosmic.300lmm.arcHgAr.table