If you wish to directly compare two spectra, it may be necessary to resample one of them so that both are on the same wavelength scale. There are several resampling routines available:
IUETERP,W2,W1,F1,vb,vc,vd,ve,vf,eps=q,nu=q,header=h
W2 | The wavelength scale to which the other spectrum will be resampled. |
W1 | The wavelengths of the spectrum to be resampled. |
F1 | Fluxes for the spectrum to be resampled. |
vb,bc,vd,ve,vf | You may resample up to five additional vectors at the same time (e.g., sigmas). |
eps | You may retain the minimum (worst) quality flag value for each resampled point if you enter your quality flags via the EPS keyword. |
nu | You may coalesce (keep all set bits) your quality flags for each resampled point if you enter them via the NU keyword. |
header | If you enter a FITS header via this keyword, a comment will be added to it describing the resampling done. |
IUETERP is a linear interpolation routine. There is also a quadratic procedure:
W1,F1 | Wavelengths and fluxes to be resampled. |
W2 | Wavelengths for which resampled flux value will be calculated. |
F2 | Calculated flux values. |
Another available procedure for resampling is SPLINE:
W1 | Wavelengths of spectrum to be resampled. |
F1 | Fluxes of spectrum to be resampled. |
W2 | Wavelengths for which new flux values will be calculated. |
F2 | Calculated flux values. |
FP | First derivative of the spline fit. |
FPP | Second derivative of the spline fit. |
FINT | Integral of the spline fit. |
Once the spectra have the same wavelength scale, you can subtract one from the other, or divide one by the other, as you wish:
plot,w1,f1-f2
or
plot,w1,f1/f2