cosmicrays / hermes

HERMES is a publicly available computational framework for the line of sight integration over galactic radiative processes which creates sky maps in the HEALPix-compatibile format.
GNU General Public License v3.0
22 stars 9 forks source link

FITS file for H2 ring model #29

Closed lepperdinger closed 2 years ago

lepperdinger commented 2 years ago

Hello!

When I try to load the ring model for the H2 gas via

auto gasType = hermes::neutralgas::GasType::H2;
auto ringModel = std::make_shared<neutralgas::RingModel>(gasType);

I get the error message

FITSIO status = 252: 1st key not SIMPLE or XTENSION
Extension doesn't start with SIMPLE or XTENSION keyword. (ffrhdu)
._WCOrings_COGAL.fits
ffopen could not interpret primary array header of file: 
/home/stefan/.virtualenvs/hermes/share/hermes/data/GasDensity/Remy18/WCOrings_CO
GAL.fits.gz
This does not look like a FITS file.
terminate called after throwing an instance of 'std::runtime_error'
  what():  hermes: error: Cannot open file.
Aborted (core dumped)

My OS is Linux Mint 20.2.

I also can't open the file hermes/share/hermes/data/GasDensity/Remy18/WCOrings_COGAL.fits.gz via SAOImageDS9 (SAOImageDS9 version = 8.1) or via astropy.io.fits.open() (astropy version = 5.1). So this file seems to be broken. If I unpack WCOrings_COGAL.fits.gz via gzip (gzip version = 1.10), the resulting file WCOrings_CO GAL.fits is still broken but if I unpack WCOrings_COGAL.fits.gz via tar (tar version = 1.30) instead, the resulting file WCOrings_COGAL.fits looks fine.

My current workaround for that problem is to extract the file via tar and then to compress it again via gzip:

hermes_virtualenv=~/.virtualenvs/hermes
cd ${hermes_virtualenv}/share/hermes/data/GasDensity/Remy18
tar xf WCOrings_COGAL.fits.gz
gzip -f WCOrings_COGAL.fits

(The FITS file is part of the archive https://heat.gssi.it/hermes/data/hermes-data.tar.gz, which gets downloaded by CMake.)

carmeloevoli commented 2 years ago

Hi! Thanks a lot for raising this issue.

I changed the WCOrings_COGAL.fits.gz file in the remote repository with the correct one (zipped via gzip version=1.12).

Now, you remove the folder and run cmake again, you should be able using it without the workaround.

lepperdinger commented 2 years ago

It works now without the workaround. Thanks!