desihub / desispec

DESI spectral pipeline
BSD 3-Clause "New" or "Revised" License
33 stars 24 forks source link

Fix CTE direction flip. #2192

Closed schlafly closed 4 months ago

schlafly commented 4 months ago

This fixes an issue with the CTE correction on amplifiers which read out in the "flipped" direction. The correction was being done "correctly" but needed to be flipped back before being applied to the image. This now occurs.

Figure shows 20240304/00228660/preproc-r7-00228660.fits.gz, left: daily preproc, middle: CTE corrected without this PR, right: CTE-corrected with this PR. image

sbailey commented 4 months ago

Thanks. To avoid other future surprises, could you also check other amps for up/down left/right flip/not correctness? I think if you invent a fake CTECOLSx range for something that doesn't actually need a correction, you should get back approximately the same image, but if there is a sign flip you'll get something dramatically bad like your middle image.

schlafly commented 4 months ago

Yes, I did a run where I added corrections to all four amps and it looks fine.