Keck-DataReductionPipelines / KPF-Pipeline

KPF-Pipeline
https://kpf-pipeline.readthedocs.io/en/latest/
Other
11 stars 2 forks source link

Add Analyze2D method to blink two 2D images #796

Closed awhoward closed 8 months ago

awhoward commented 8 months ago

I implemented the ability to blink a pair of 2D images, as described in Issue https://github.com/Keck-DataReductionPipelines/KPF-Pipeline/issues/761 (which calls it an overlay instead of blinking). The new method also allows for zooming in.

This probably won't be used as a regular part of the Quicklook plots on Jump, but it will be helpful for diagnostic purposes (e.g., during the service mission in Feb. 2024).

Two example images are below and some example code is here:

        Example:
            ObsID1 = 'KP.20240131.01126.61' # flat
            ObsID2 = 'KP.20240131.18680.85' # wideflat - f/4
            D2_file1 = '/data/2D/' + get_datecode(ObsID1) + '/' + ObsID1 + '_2D.fits'
            D2_file2 = '/data/2D/' + get_datecode(ObsID2) + '/' + ObsID2 + '_2D.fits'
            D2_1 = KPF0.from_fits(D2_file1)
            D2_2 = KPF0.from_fits(D2_file2)
            myD2 = Analyze2D_2files(D2_1, D2_2)
            myD2.plot_2D_image_blink(chip='green', fig_path=ObsID1 + '_' + ObsID2 + '_blink.gif')
            myD2.plot_2D_image_blink(chip='green', zoom_coords=(1640, 1640, 2440, 2440), fig_path=ObsID1 + '_' + ObsID2 + '_zoom_blink.gif')

KP 20240131 01126 61_KP 20240131 18680 85_blink

KP 20240131 01126 61_KP 20240131 18680 85_zoom_blink

awhoward commented 8 months ago

@bjfultn, the most recent commit fixes a bug in the determination of dark current (and is unrelated to the plotting described above). It would be good to include this in the new version for reprocessing.