PlotSpectra and IRAF cropped spectra
Posted: Sun Nov 12, 2017 3:08 pm
Hi Tim, I have found an anomaly with PlotSpectra if I plot spectra cropped in IRAF.
From what I can tell you start plotting at CRVAL1 which seems reasonable. So for an original image (i.e. not cropped) IRAF has say CRVAL1 = 5763.231... and CRPIX1 = 1.
However if you crop the image rather than update CRVAL1 IRAF updates CRPIX1 , LTV1, CDELT1, CD1_1 and LTM1_1
Thus after a crop I get CRVAl1 = 5763.231 and CRPIX1 = -454.8499... and LTV1 = -455.8501.
Given the scale cropped scale is CDELT1 = 0.071884498... it looks like the plot should start at CRPIX1 - CRPIX1*CDELT1. (-ve as CRPIX1 is negative).
However I am not familiar enough with the FIT format to be sure.
I will look into how the crop is being done to see if I can make it crop without these issues.
ISIS does seem to do it correctly as far as I can tell.
Regards Andrew
From what I can tell you start plotting at CRVAL1 which seems reasonable. So for an original image (i.e. not cropped) IRAF has say CRVAL1 = 5763.231... and CRPIX1 = 1.
However if you crop the image rather than update CRVAL1 IRAF updates CRPIX1 , LTV1, CDELT1, CD1_1 and LTM1_1
Thus after a crop I get CRVAl1 = 5763.231 and CRPIX1 = -454.8499... and LTV1 = -455.8501.
Given the scale cropped scale is CDELT1 = 0.071884498... it looks like the plot should start at CRPIX1 - CRPIX1*CDELT1. (-ve as CRPIX1 is negative).
However I am not familiar enough with the FIT format to be sure.
I will look into how the crop is being done to see if I can make it crop without these issues.
ISIS does seem to do it correctly as far as I can tell.
Regards Andrew