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

Astropy checksum verification fails for fits produced by EleFits #62

Open
kabasset opened this issue Jun 24, 2024 · 0 comments
Open

Astropy checksum verification fails for fits produced by EleFits #62

kabasset opened this issue Jun 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kabasset
Copy link
Collaborator

Mirror of https://euclid.roe.ac.uk/issues/26018

I'm trying to add the checksum to the fits file using EleFits, but I'm encountering troubles. Here is a minimal example:

auto obj = Euclid::Fits::MefFile ("myfile.fits", Euclid::Fits::FileMode::Create);
std::vector<long> naxes {3, 2};
auto shape = Euclid::Fits::Position<-1> (naxes.begin(), naxes.end());
std::vector<double> datavec {1, 2, 3, 4, 5, 6};
Euclid::Fits::PtrRaster<double, -1> ptrRaster(shape, datavec.data());
obj.primary().updateShape<double, -1>(shape);
obj.primary().writeRaster(ptrRaster);
obj.primary().update_checksums();

The file is written and it contains the fields CHECKSUM and DATASUM in the header. But when I open it, astropy.io.fits raises the following warning:

WARNING: Checksum verification failed for HDU ('PRIMARY', 1).

The EleFits version is 5.3.0.
Could you please help me with this?
Thanks
Emiliano

@kabasset kabasset added the bug Something isn't working label Jun 24, 2024
@kabasset kabasset added this to the 5.3 milestone Jun 24, 2024
@kabasset kabasset self-assigned this Jun 24, 2024
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

1 participant