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

error reading fits file in Clusters.ipynb #88

Open
alxogm opened this issue Jan 26, 2022 · 3 comments
Open

error reading fits file in Clusters.ipynb #88

alxogm opened this issue Jan 26, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@alxogm
Copy link
Collaborator

alxogm commented Jan 26, 2022

I'm getting the following error, in section Clusters observed by DESI of Clusters.ipynb,

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
/tmp/ipykernel_69/3226039553.py in <module>
      6     download(url, './tmp/')
      7 
----> 8     cats[t] = fitsio.read('./tmp/desihigh_{}'.format(os.path.basename(url)))
      9 
     10     print(t, './tmp/desihigh_{}'.format(os.path.basename(url)))

/srv/conda/envs/notebook/lib/python3.7/site-packages/fitsio/fitslib.py in read(filename, ext, extver, columns, rows, header, case_sensitive, upper, lower, vstorage, verbose, trim_strings, **keys)
    137         read_kwargs['rows'] = rows
    138 
--> 139     with FITS(filename, **kwargs) as fits:
    140 
    141         if ext is None:

/srv/conda/envs/notebook/lib/python3.7/site-packages/fitsio/fitslib.py in __init__(self, filename, mode, lower, upper, trim_strings, vstorage, case_sensitive, iter_row_buffer, write_bitcols, ignore_empty, verbose, clobber, **keys)
    518 
    519         self._did_create = (create == 1)
--> 520         self._FITS = _fitsio_wrap.FITS(filename, self.intmode, create)
    521 
    522     def close(self):

OSError: FITSIO status = 108: error reading from FITS file
Error reading data buffer from file:
./tmp/desihigh_redmapper_dr8_public_v5.10_catalog.fits
ffopen could not interpret primary array header of file: 
./tmp/desihigh_redmapper_dr8_public_v5.10_catalog.fits

I've tried both in Binder and Colab. BTW, if we could use astropy to read the fits file would be better since Colab doesn't have fitsio by default, we could install it, but would be simpler if we use astropy...

@michaelJwilson
Copy link
Contributor

@jtmyles any chance you could take a quick look at this?

@jtmyles jtmyles mentioned this issue Feb 7, 2022
@cylammarco cylammarco added the bug Something isn't working label Feb 13, 2022
@michaelJwilson
Copy link
Contributor

#89 should contain the fix (thanks @jtmyles), but admittedly is showing errors of 'not json of notebook'. To be investigated further.

@cylammarco
Copy link
Collaborator

Would you please copy the entire error message @michaelJwilson?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants