newredshift -- Artificially change the redshift of spectra.
newredshift input output
This task changes the wavelength scale of spectra, moving them from one given redshift to another one. The input spectra are specified by an image template list. The output is either a matching list of spectra or a directory. The task works by copying the input spectra to the output destination, and then modifying the header keywords that describe the wavelength axis, on the output spectra only. A spectrum may not be copied onto itself; this prevents original wavelength information from being accidently overwritten. Image sections are ignored both on input and output, because it is assumed that the user wants a copy of the input with the wavelength scale modified.
This task looks in the header for keywords describing the wavelength axis; keywords are sought in the following order: first, IRAF keywords W0 and WPC; next, CD keywords CRVALn and CDn_1; and finally, FITS keywords CRVALn and CDELTn (n is the value of task parameter axis, unless the IRAF header keyword DISPAXIS is found, in which case it takes precedence over the parameter). Logarithmic wavelength scale is treated correctly if either the log task parameter is set to "yes" or if the IRAF header keyword DC-FLAG is found in the header with value 1. HISTORY records are appended to the header.
Note that the original spectrum is *not* re-binned. Thus the task is appropriate only for small values of redshift, and for spectra that span a relatively small wavelength range.
- input [file name template]
- Name(s) of the input files containing spectra.
- output [file name or directory name]
- The output file, or directory, to which the transformed spectra will be written.
- (axis = 1) [integer]
- The dispersion axis on the input and output spectra.
- (oldz = 0.0) [real]
- The redshift of the input spectra.
- (newz = 0.0) [real]
- The redshift of the output spectra.
- (log = no) [boolean]
- Is the wavelength scale logarithmic?
- (verbose = yes) [boolean]
- Print operations?
If set to "yes", the wavelength origin and step for both the input and output spectra are listed as the task progresses.
1. Transform a set of spectra with root name cluster* and redshift 0.05 to redshift 0.0. The result will be stored in subdirectory local/. The input spectra are in STSDAS format (extension .hhh).
to> newredshift cluster*.hhh local/ oldz=.05
This task was written by I.Busko