cylammarco / ASPIRED

Automated SpectroPhotometric Image REDuction (ASPIRED)
https://aspired.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
30 stars 4 forks source link

Keyword LABEL fits header #77

Closed bschneider-astro closed 2 years ago

bschneider-astro commented 2 years ago

Hi @cylammarco, thank you for this amazing and user friendly tool you have developed to reduce spectral data. I noticed that the LABEL keyword in the header of the fits created by the _savefits function with the output='flux' option of (at least) OneDSpec is the same for the three HDU images. It seems to be the same when I use output='count_resampled+flux_resampled' . To analyze the reduced and calibrated spectrum, I would need to have a unique ID for each HDU image to automatically find and open the right image in the script. Another possibility would be to add a name to each extension instead of "NoName". Please let me know if anything can be done. Thanks, Benjamin.

Screenshot 2022-03-25 at 15 12 01
cylammarco commented 2 years ago

Hi @bschneider-astro, thank you for using aspired and reporting the bug. Would you please try the fix at the main branch and see if it fixes your problem? The EXTNAME and LABEL for each HDU are now unique and the pairs are identical. If that works, I can turn this into a patch release.

bschneider-astro commented 2 years ago

I tested with the main branch and now the EXTNAME and LABEL of the fits file are perfect. Thanks for the quick fix!

Screenshot 2022-03-25 at 17 01 22