dopcor -- Apply doppler correction
dopcor input output redshift
The input spectra (as specified by the input image list and apertures) are corrected by removing a specified doppler shift and written to the specified output images. The correction is such that if the actual shift of the observed object is specified then the corrected spectra will be the rest spectra. The opposite sign for a velocity or the redshift complement (1/(1+z)-1) may be used to add a doppler shift to a spectrum.
There are two common usages. One is to take spectra with high doppler velocities, such as cosmological sources, and correct them to rest with respect to the earth. In this case the measured redshift or velocity is specified to "remove" this component. The other usage is to correct spectra to heliocentric or local standard of rest. The heliocentric or LSR velocities can be computed and entered in the image header with the task rvcorrect . In this case it is tempting to again think you are "removing" the velocity so that you specify the velocity as given in the header. But actually what is needed is to "add" the computed standard of rest velocity to the observed spectrum taken with respect to the telescope to place the dispersion in the desired center of rest. Thus, in this case you specify the opposite of the computed heliocentric or LSR velocity; i.e. use a negative.
The redshift or space velocity in km/s is specified either as a number or as an image header keyword containing the velocity or redshift. If a number is given it applies to all the input spectra while an image header keyword may differ for each image. The latter method of specifying a velocity is useful if velocity corrections are recorded in the image header. See rvcorrect for example.
The choice between a redshift and a space velocity for the redshift parameter is made using the isvelocity parameter. If isvelocity=yes then the header dispersion solution is modified according to the relativistic Doppler correction:
lambda_new = lamda_old * sqrt((1 + v/c)/(1 - v/c))
where v is the value of "redshift". If isvelocity=no, redshift is interpreted as a cosmological redshift and the header dispersion solution is modified to give:
lambda_new = lamda_old * z
where z is the value of "redshift"
If the add parameter is used and the image uses a "multispec" format where the previous doppler factor is stored separately then the new doppler factor is:
znew = (1 + z) * (1 + zold) - 1 = z + zold + z * zold
where z is the specified doppler factor, zold is the previous one, and znew is the final doppler factor. If the add parameter is no then the previous correction is replaced by the new correction. Note that for images using a linear or equispec coordinate system the corrections are always additive since a record is not kept of the previous correction. Also any flux correction is made based on the specified doppler correction rather than znew.
There are two corrections which may be made and the user selects one or both of these. A correction to the dispersion function is selected with the dispersion parameter. This correction is a term to be applied to the dispersion coordinates defined for the image. The spectrum is not resampled, only the dispersion coordinate function is affected . A correction to the flux, pixel values, is selected with the flux parameter. This correction is only significant for cosmological redshifts. As such the correction is dependent on a cosmological model as well as whether a total flux or surface brightness is measured. To provide the range of possible corrections the flux correction factor is defined by the factor parameter as the power of 1+z (where z is the redshift) to be multiplied into the observed pixel values.
1. To dispersion and flux correct a quasar spectrum with redshift of 3.2 to a rest frame:
cl> dopcor qso001.ms qso001rest.ms 3.2 flux+
2. To correct a set of spectra (in place) to heliocentric rest the task rvcorrect is used to set the VHELIO keyword using an observed velocity of 0. Then:
cl> dopcor *.imh "" -vhelio isvel+
3. To artificially add a redshift of 3.2 to a spectrum the complementary redshift is computed:
cl> = 1/(1+3.2)-1 -0.76190476190476 cl> dopcor artspec "" -0.762 flux+
The add parameter was added.