You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a FITS file contains non-standard FITS header, the ImageFileCollection does not work:
fromastropy.ioimportfitsimportastropyimportccdprocimportnumpyasnpprint(np.__version__)
# 1.13.3print(astropy.__version__)
# 2.0.3print(ccdproc.__version__)
# 1.3.0'''The test header looks like this:NAXIS1 = 10 / length of data axis 1 NAXIS2 = 10 / length of data axis 2 TESTVERI= '2017/02/13-16:51:38 / Test VerifyWarning'''testh=fits.Header.fromtextfile('test_hdr.txt')
testfits=fits.PrimaryHDU(data=np.ones((10,10)), header=testh)
testfits.writeto('test_warnA.fits', output_verify='warn', overwrite=True)
ccdproc.ImageFileCollection('.', glob_include='*warnA*')
Traceback (most recent call last):
File "<ipython-input-19-0eff28aafa40>", line 12, in <module>
ccdproc.ImageFileCollection('.', glob_include='*warnA*')
File "/home/aaa/anaconda3/lib/python3.6/site-packages/ccdproc/image_collection.py", line 153, in __init__
self.keywords = keywords
File "/home/aaa/anaconda3/lib/python3.6/site-packages/ccdproc/image_collection.py", line 302, in keywords
self._summary = self._fits_summary(new_keys_lst)
File "/home/aaa/anaconda3/lib/python3.6/site-packages/ccdproc/image_collection.py", line 619, in _fits_summary
missing_marker=missing_marker)
File "/home/aaa/anaconda3/lib/python3.6/site-packages/ccdproc/image_collection.py", line 530, in _dict_from_fits_header
for k, v in six.iteritems(h):
File "/home/aaa/anaconda3/lib/python3.6/site-packages/astropy/io/fits/header.py", line 940, in iteritems
yield (card.keyword, card.value)
File "/home/aaa/anaconda3/lib/python3.6/site-packages/astropy/io/fits/card.py", line 285, in value
self._value = self._parse_value()
File "/home/aaa/anaconda3/lib/python3.6/site-packages/astropy/io/fits/card.py", line 744, in _parse_value
".verify('fix').".format(self.keyword))
VerifyError: Unparsable card (TESTVERI), fix it first with .verify('fix').
Maybe one possibility is to introduce a parameter like verify or verify_option which will be used to circumvent the default verify option"exception"?
The text was updated successfully, but these errors were encountered:
ysBach
changed the title
put verify option to ImageFileCollection
Put verify option to ImageFileCollection?
Dec 30, 2017
If a FITS file contains non-standard FITS header, the
ImageFileCollection
does not work:Maybe one possibility is to introduce a parameter like
verify
orverify_option
which will be used to circumvent the default verify option"exception"
?The text was updated successfully, but these errors were encountered: