We've noticed an offset in the wavelength scales when comparing python and IDL reduced cubes for the same object. For data taken with the small slicer and BL grating (0.5 Å dispersion), the two spectra are offset by 0.5 Å (see figure below).
We compared this with an ESI spectrum of the same object (see second and third figures) and the easy solution is to simply adjust CRVAL3 or CRPIX3 in the header based on the dispersion so that the spectra overlap since the offset is relatively linear across the bandpass.
However, we've noticed this issue with with data taken with the BM grating and medium slicer (1 Å dispersion). In the figure below, py and py2 are two different data reduction iterations with the python DRP and IDL is the spectrum taken from the IDL reduced cube. In this case, the spectra are again offset by the instrument dispersion (1 Å) with the IDL spectrum likely being accurate. The concern is that the python reduced spectra have different lengths and starting positions but the spectra still overlap. As with the above example, the IDL and python reduced spectra have different wavelength array lengths - is it obvious why they would differ so much?
This issue seems to be slightly different than issue #112, but we're curious if this might have something to do with the way python treats bin edges vs. bin centers in arrays. In all of the above plots, we've consistently used the default where='pre' in matplotlib.pyplot.step to avoid an additional offset. Perhaps this might simply be a counting issue (starting on zero vs. one) between IDL and python that wasn't changed over during the port?
We've noticed an offset in the wavelength scales when comparing python and IDL reduced cubes for the same object. For data taken with the small slicer and BL grating (0.5 Å dispersion), the two spectra are offset by 0.5 Å (see figure below).
We compared this with an ESI spectrum of the same object (see second and third figures) and the easy solution is to simply adjust
CRVAL3
orCRPIX3
in the header based on the dispersion so that the spectra overlap since the offset is relatively linear across the bandpass.However, we've noticed this issue with with data taken with the BM grating and medium slicer (1 Å dispersion). In the figure below,
py
andpy2
are two different data reduction iterations with the python DRP andIDL
is the spectrum taken from the IDL reduced cube. In this case, the spectra are again offset by the instrument dispersion (1 Å) with the IDL spectrum likely being accurate. The concern is that the python reduced spectra have different lengths and starting positions but the spectra still overlap. As with the above example, the IDL and python reduced spectra have different wavelength array lengths - is it obvious why they would differ so much?This issue seems to be slightly different than issue #112, but we're curious if this might have something to do with the way python treats bin edges vs. bin centers in arrays. In all of the above plots, we've consistently used the default
where='pre'
inmatplotlib.pyplot.step
to avoid an additional offset. Perhaps this might simply be a counting issue (starting on zero vs. one) between IDL and python that wasn't changed over during the port?