Skip to content
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

fix preproc/fibermap keyword propagation #1045

Merged
merged 1 commit into from Dec 11, 2020
Merged

fix preproc/fibermap keyword propagation #1045

merged 1 commit into from Dec 11, 2020

Conversation

sbailey
Copy link
Contributor

@sbailey sbailey commented Dec 11, 2020

Header keyword updates: this PR fixes #963 (FIBERMAP missing OBSTYPE) and fixes #964 (inconsistent EXPTIME in different HDUs). Reviews are welcome if you can get them in by Friday noon, otherwise I'd like to merge Friday afternoon for test runs over the weekend prior to the NERSC outage next week.

In the case of EXPTIME, the problem was that the fibermap is generated from several input files and it was getting its EXPTIME from the guider file instead of the spectrograph raw data file, resulting in inconsistent numbers.

For OBSTYPE, it was originally coming from the guider file but arcs and flats don't have that input. Now the fibermap also gets keywords from the raw data file, and thus picks up OBSTYPE too.

Tested with:

assemble_fibermap -n 20200315 -e 55612 -o fibermap-00055612.fits
desi_preproc -n 20200315 -e 55612 --fibermap fibermap-00055612.fits \
    --cameras b0 --outdir .
desi_preproc -n 20200315 -e 55717 --cameras b0 --outdir .
fitsheader -k OBSTYPE -k EXPTIME preproc-b0-00055612.fits
fitsheader -k OBSTYPE -k EXPTIME preproc-b0-00055717.fits

Main branch:

# HDU 0 in preproc-b0-00055612.fits:
EXPTIME =                 900. / [s] Actual exposure time                       
# HDU 1 in preproc-b0-00055612.fits:
# HDU 2 in preproc-b0-00055612.fits:
# HDU 3 in preproc-b0-00055612.fits:
# HDU 4 in preproc-b0-00055612.fits:
OBSTYPE = 'SCIENCE '                                                            
EXPTIME =                 20.0                     

# HDU 0 in preproc-b0-00055717.fits:
EXPTIME =                  60. / [s] Actual exposure time                       
# HDU 1 in preproc-b0-00055717.fits:
# HDU 2 in preproc-b0-00055717.fits:
# HDU 3 in preproc-b0-00055717.fits:
# HDU 4 in preproc-b0-00055717.fits:                             

Note that OBSTYPE is missing from HDU 0, sometimes missing from HDU 4 (FIBERMAP) and EXPTIME is inconsistent between HDUs 0 and 4.

This PR:

# HDU 0 in preproc-b0-00055612.fits:
OBSTYPE = 'SCIENCE '                                                            
EXPTIME =                 900. / [s] Actual exposure time                       
# HDU 1 in preproc-b0-00055612.fits:
# HDU 2 in preproc-b0-00055612.fits:
# HDU 3 in preproc-b0-00055612.fits:
# HDU 4 in preproc-b0-00055612.fits:
OBSTYPE = 'SCIENCE '                                                            
EXPTIME =                900.0                                                  

# HDU 0 in preproc-b0-00055717.fits:
OBSTYPE = 'FLAT    '                                                            
EXPTIME =                  60. / [s] Actual exposure time                       
# HDU 1 in preproc-b0-00055717.fits:
# HDU 2 in preproc-b0-00055717.fits:
# HDU 3 in preproc-b0-00055717.fits:
# HDU 4 in preproc-b0-00055717.fits:
OBSTYPE = 'FLAT    '                                                            
EXPTIME =                 60.0                                                  

@sbailey sbailey added this to In progress in SV-start via automation Dec 11, 2020
Copy link
Contributor

@julienguy julienguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Checked on TESTARC data. Good to have the obstype keyword in the preprocessed arc lamp data.

@sbailey sbailey merged commit c25e641 into master Dec 11, 2020
SV-start automation moved this from In progress to Done Dec 11, 2020
@sbailey sbailey deleted the keywords branch December 11, 2020 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
SV-start
  
Done
Development

Successfully merging this pull request may close these issues.

inconsistent EXPTIME in different HDUs preproc files header missing OBSTYPE keyword
2 participants