Skip to content

Add (optional) peak metrics from skycorr-PCA to the sky*.fits files#2707

Draft
rongpu wants to merge 1 commit intomainfrom
sky-peak-metrics
Draft

Add (optional) peak metrics from skycorr-PCA to the sky*.fits files#2707
rongpu wants to merge 1 commit intomainfrom
sky-peak-metrics

Conversation

@rongpu
Copy link
Copy Markdown
Contributor

@rongpu rongpu commented Apr 4, 2026

This PR adds the option to add the sky line peak metrics that can be useful diagnostics –– see the example below. Specifically, it adds these 6 FITS HDUs: PEAK_DW_BEFORE, PEAK_DLSF_BEFORE, PEAK_CHI2PDF_BEFORE, PEAK_DW_AFTER, PEAK_DLSF_AFTER, PEAK_CHI2PDF_AFTER.

sky-20260314-2620-z7-00341860-peak_dw-new

The addition HDUs only increases the file size by ~10%, and since the sky files are already small (~5 MB), the size increase would be quite negligible. So we could also consider adding these HDUs as a default (right now it is disabled by default). The other advantage of having these HDUs is that we can use them to directly compute the skycorr-PCA templates –– the current procedure requires rerunning desi_proc which is very cumbersome.

I should note that while I have tested the new code by running desi_compute_sky, I have not done extensive testing with the full pipeline.

@rongpu
Copy link
Copy Markdown
Contributor Author

rongpu commented Apr 4, 2026

Correction: the additional HDUs are not sufficient to compute skycorr-PCA templates. To do that, we would also need to save the peak wavelength and the DWAVE/DLSF errors.

@rongpu rongpu marked this pull request as draft April 6, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant