Notes to self. From while going through draft tutorial notebooks #84 with @kammerje and @juliengirard.
[x] display image function, would be nice to label SCI vs REF in the images
[ ] Show in tutorial notebook use of !open on a Mac to open the PDFs
[x] Add comment explanation text about level 2 images should look much like level 1, except scaled now to MJy/sr
[ ] Consider updating log text output to update lines in place in some cases, for instance using tqdm for a progress meter
[ ] Update the plotting code in recenter and align to show those plots in the notebook, or just read the output PDFs into the notebook
[x] Check debug align_ref plots that should show all the data points for all 9 dithers [Edit: This works fine now; must have been messed up earlier by some transient issue from our messing around and re-running steps in the notebook]
[x] Minor, move the Align-ref plots gray axes lines to further back zorder. And add some metadata in these plots for filters etc.
[x] check if the bad pixel fixing corrects the DQ flags or not; why does my plotting code still show many BPs after the cleaning steps? It may not save the DQs in the output. Specifically the DO NOT USE bit. [Edit: Correct, this was not saving the cleaned DQs. Fixed to do so]
[ ] extract_companions doc str says it can accept a dict but it actually can’t
[ ] Extract companions should not need the star spectrum input. That’s only really needed for the contrast.
[x] MIRI contrast analyses needs the mask file for where to mask out around the QPM axes
[ ] If you haven’t made the contrast PSF masks, it should print a warning about that.
[ ] Update the method behind the scenes for producing the PSF mask file with the many shifted copies. Can avoid outputting many temp files, instead use the shift metadata at the end to generate it all
[ ] Consider masking all the ND square regions to NANs or otherwise in general mask them to be unused.
[ ] Revisit and think more about order of operations for recentering/aligning frames versus padding. Right now, the reentering steps happen before padding, which introduces wrapping. It seems it would be better to pad with zeros first at least enough to avoid wrapping, and shift into that padded array. This is only relevant for the outermost pixels in the FOV however, but may be relevant for minimizing edge effects in MIRI coronagraphy?
Notes to self. From while going through draft tutorial notebooks #84 with @kammerje and @juliengirard.