specrectify– Correct images for wavelength dispersion
specrectify images solfile outimages outpref (caltype) (function) (order) (inttype) (w1) (w2) (dw) (nw) (blank) (clobber) (logfile) (verbose)
Specrectify will wavelength calibrate a spectroscopic image based either on a solution from an arc lamp or based on the model of the spectrograph. Given an uncalibrated science frame, spectrectify returns a image where the x-axis has been transfered onto a scale with linear spacing. For the image, all of the appropriate information has been updated in the image header.
If caltype is ‘line’, the task will assume that the wavelength solution will be provided in solfile. This file is the output produced from specidentify and may contain multiple different wavelength solutions for different arc lamps and instrument setups. The task will find the calibration using the same instrument setup that is closest in time and use that calibration to correct the data.
If caltype is ‘rss’, the task will use the model parameters for RSS to wavelength calibrate the data.
In either case, the output will be a wavelength calibrated data set. If w1, w2, dw, or nw are set, it will use these parameters to determine the boundaries of the output data. Otherwise, it will calculate these paramters based on the data set by determine the maximum and minimum wavelength at the central row and maintining the same number of pixels in the output data. Currently, all spacing is assumed to be linear in wavelength space.
The user can specify the type of interpolation for the flux measurements with inttype. It can either be linear sampling or spline. With blank, the user can specify a constant value for the flux in regions in the final data that would not appear on the original data.
If the input file contains variance and bad pixel frames, it will produce those in the output files as well. If there are multiple science frames in the image, it will wavelength calibrate each of the science frames in the data along with the corresponding variance and bad pixel frames. It will not use the same calibration for each science frame, but it will recalculate the
Finally, the task will update the WCS keywords such that the data will transform between pixel and wavelength space. The default units for the wavelength axis are Angstroms.
EXAMPLES 1. To calibrate science FITS files with specrectify using solutions based on an arc lamp:
--> specrectify images='pmbxpP*.fits' solfile='dbsol'
outimages= outpref='r' caltype='lines' logfile='salt.log'
Individual unbinned raw full-frame RSS files can be 112MB in size. It is recommended to use workstations with a minimum of 512MB RAM. On a linux machine with 2.8 Ghz processor and 2 Gb of RAM, one 2051x2051 image in 0.15 sec.
Currently, the wavelengths are specified for air and not vacuum. The sampling type is fixed to linear.
Send feedback and bug reports to salthelp@saao.ac.za