const char isaac_sw_arc_version[] = "$Revision: 1.5 $"; const char isaac_sw_arc_date[]="$Date: 2001/07/31 07:26:34 $"; int isaac_sw_arc_main(void * d); cmdline_spec isaac_sw_arc_cmd[] = { {'o', "output", "Output file", 1, "outfile"}, {'r', "rejected_ends", "Rejected pixels", 1, "nb_rejected"}, {'b', "reject_left", "Left rejected", 1, "left_rej"}, {'e', "reject_right", "Right rejected", 1, "right_rej"}, {'l', "catalog", "Used lines", 1, "catalog"}, {'s', "subdark", "Auto dark subtraction", 0, NULL}, {'c', "out_corr", "Output corrected frames", 0, NULL}, {0, 0, 0, 0, 0} }; const char isaac_sw_arc_man[]= "\n" "NAME\n" " isaacp sw_arc - arc detection, distortion correction and\n" " wavelength calibration in SW mode\n" "\n" "SYNOPSIS\n" " isaacp sw_arc [options] \n" "\n" "DESCRIPTION\n" " sw_arc detects vertical or horizontal arcs in a spectral\n" " image, models the corresponding deformation (in the x or y\n" " direction only) and corrects the found deformation along\n" " the x or y direction. Finally a wavelength calibration\n" " using a lamp spectrum catalog is made.\n" "\n" " The input frames are first classiffied by setting. For\n" " each different setting, a series of pairs on-off are\n" " expected. The off frame is the dark and is subtracted to\n" " the other frame. The resulting frame is reduced.\n" "\n" " The command takes as input: an image or an ascii list file\n" " of images. A lines catalog, a rejected\n" " zone and a flag for the dark subtraction can be specified\n" " in options. The command outputs tfits tables with the\n" " wavelength calibration and the deformation polynomial.\n" "\n" "ALGORITHM\n" " The following steps are performed:\n" " 1. dark subtract images (if specified by option -s or\n" " --subdark)\n" " 2. classify the input frames by setting. One setting is\n" " defined by the resolution, the central wavelength and the\n" " slit used.\n" "\n" " For each setting: For each pair:\n" " 3. identify the present frames according to the lamps sta­\n" " tus: dark, xenon, argon or xenon+argon.\n" " 4. subtract the dark correction (if present) to the non-\n" " dark frames.\n" " 5. detect arcs\n" " 6. fit the surface polynomial\n" " 7. warp the original image\n" " 8. create a first order estimate of the dispersion rela­\n" " tion based on the physical model (see isaac_cal)\n" " 9. create a second order estimate by cross-correlating the\n" " lamp catalogue(s) with the detected line spectra.\n" "\n" " The deformation model is a bivariate 2-d polynomial, i.e.:\n" "\n" " Let the deformed image be expressed in (u,v) coordinates,\n" " and the corrected image in (x,y). Assuming vertical arcs,\n" " the modeled correction is then\n" " u = a + bx + cy + dx^2 + ey^2 + fxy\n" " v = y\n" "\n" "NOTES\n" " The arc detection is based on the following assumptions:\n" " The images are dark subtrated.\n" " Arcs are at least 1/2 image long, and not much wider\n" " than 32 pixels (i.e. the lines must have a well defined\n" " peak less than 32 pixels wide). Arcs which do not fullfill\n" " these criteria are ignored in the subsequent steps.\n" " At least 4 valid (see above) arcs are identifiable.\n" "\n" "OPTIONS\n" " -o or --output outname\n" " outname is the output files basename.\n" "\n" " -r or --rejected_ends rej\n" " number of pixels to reject at both ends of the slit\n" "\n" " -b or --reject_left rej_l\n" " number of pixels to reject at left bordure\n" "\n" " -e or --reject_right rej_r\n" " number of pixels to reject at right bordure\n" "\n" " -l or --catalog Xe | Ar | Xe+Ar | oh\n" " This option is only considered if the input file is\n" " a fits image. It forces the procedure to correlate\n" " the detected lines with the specified catalog\n" " (without reading which lamp is activated in the\n" " header).\n" "\n" " -s or --subdark\n" " Flag to specify that any residual dark found in the\n" " frames should be subtracted.\n" "\n" " -c or --out_corr\n" " Flag to output the corrected images.\n" "\n" "FILES\n" " The default output name is the basename of the input file\n" " followed by \"_arc___.tfits\", where\n" " is a number, is LR or MR and is\n" " empty (if the mode is MR) or Xe (Xenon) or Ar (Argon). It\n" " is possible to specify an output basename on the command\n" " line.\n" "\n";