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

colfax test fails at tweakreg #15

Open
jasonmold opened this issue Mar 21, 2020 · 2 comments
Open

colfax test fails at tweakreg #15

jasonmold opened this issue Mar 21, 2020 · 2 comments

Comments

@jasonmold
Copy link

Since the pipeline only looks for the colfax dataset I let it run the test, which actually failed:

Version Information

Python Version [Clang 9.0.1 ]
3.7.6 | packaged by conda-forge | (default, Mar 5 2020, 15:03:29)
numpy Version -> 1.18.1
astropy Version -> 4.0
stwcs Version -> 1.5.3

Finding shifts for:
colfax_f160w_e01_12443_1B_nat_drz_sci.fits

=== Source finding for image 'colfax_f160w_e01_12443_1B_nat_drz_sci.fits':
Trailer file written to: tweakreg.log
Traceback (most recent call last):
....
....
File "/Users/jason/anaconda2/envs/astroconda/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 742, in index_of
raise KeyError(f'Extension {key!r} not found.')
KeyError: "Extension ('', 1) not found."

@srodney
Copy link
Owner

srodney commented Mar 24, 2020

@jasonmold thanks for highlighting this, and apologies for the troubles here. Several USC students have been working on improvements to sndrizpipe, and in the process we've uncovered some peculiarities in the fits structure of certain drizzled images produced by DrizzlePac, which is the problem you've identified here. I've raised this as a bug with the DrizzlePac developers, but they've indicated that the cure may not suit the ailment. There are two options for you in the short term:

  1. adopt my fork of DrizzlePac wherein I have made the bug fix proposed in the thread linked above. This fork will not keep up with the development of DrizzlePac from STScI, but it will work with sndrizpipe now. (this is what my students have done locally)

  2. adjust sndrizpipe so that it fixes the fits headers, either by adding a 'sci' extension to the _drz_sci.fits files whenever it is missing or by deleting 'EXTVER' from the primary header if 'EXTNAME' is not present in your files. This latter is the solution proposed from mcara at STScI.

We may be able to do the latter fix eventually, but since we've gotten past this with fix 1 it will be on the back burner for us. If you do make it work, then please issue a pull request and we'll be happy to adopt it in this original repository.

@jasonmold
Copy link
Author

I removed EXTVER from the science files and confirm this fixes the bug. Why not implementing this simple fix into sndrizpipe?

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

No branches or pull requests

2 participants