-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save the trace shift offsets in the psf file #2411
Conversation
Thanks. I agree with the spirit of this PR, but I have a few questions / comments (admittedly some of which are due to my lack of knowledge of the trace fitting code, but I'd like to get thing documented here): This changes the output signature of several functions. Please
e.g. Please document the meaning of "internal offsets" and "external offsets" more. I'm sure it is in the code, but what exactly are we saving here? I tried running
and got an EXTOFF table with only 4 rows, and an INTOFF table with 2997 rows, approximately 6 wavelengths x 500 fibers (I didn't track down which fiber had fewer wavelengths). Related: with existing files, you can compare the XTRACE and YTRACE solutions between a reference and shifted PSF, e.g. kibo/calibnight/20220121/psfnight-b1-20220121.fits vs. kibo/exposures/20220121/00119691/psf-b1-00119691.fits . Are these new extensions primarily about convenience (no need to lookup the reference PSF), or about saving intermediate data for debugging (the offsets applied before re-fitting Legendre coefficients) or something else? Let's make all output columns UPPERCASE. That's old-school, but its the standard for DESI files to improve compatibility with FITS readers/writers from other languages (IDL in particular). |
Thanks for the comments @sbailey I first wanted to see if this is broadly acceptable, before I did any beautification, hence a bit of preliminary shape of the patch. I agree function signature needs updated and internal/external offset concept better explained. I'll check if changed functions are used elsewhere else and I'll update things to upper-case as well. Regarding purpose of this. These offsets offer more than convenience, because right now can't be easily reconstructed from existing information otherwise. Because the Legendre coefficients are 'fits' to old Legendre + the offsets. Since the fits cannot-capture all the offsets exactly, the offset behaviour is kinda lost.
|
update QA code expand comments uppercase the column names
Just confirming further that the functions that were updated are
I believe all their calls throughout desispec have been updated. Just maybe a final few points on design choices.
|
Looks good, thanks for the updates. Interesting structure indeed (should be temperature dependent when comparing different exposures). |
For the record: these additional HDUs will appear in the daily production starting with night 20241203 (I just updated the NERSC code by hand rather than waiting for the typical middle-of-the-night cronjob). |
Thank you @sbailey ! |
This is the proposed followup from #2386 (assuming it's merged)
I propose to save the trace-shift offsets (in wavelength) in the psf file, to allow monitoring/improvement/debugging.
The extension/column names are somewhat temporary/can be changed if needed.
The increase in the file size from this is tiny ~ 5% for ~ 1Mb sized psf files.
One could in principle make this optional, i.e. save the offsets if some command-line argument is passed.