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

Header validation error #18

Open
Saturnyn opened this issue Jul 20, 2023 · 1 comment
Open

Header validation error #18

Saturnyn opened this issue Jul 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Saturnyn
Copy link

Hi,
I'm using the library to validate an existing fits file, but I get an error message that I don't understand:
"Data contains 9 bytes but supposed to be 24385536 bytes"

I don't understand the validation code that triggers this error. In AnyHDU.swift:
if modified == false && headerUnit.count < headerUnit.dataSize {

It looks like it is comparing two different things, the number of items in the header and the number of bytes in the data ?

Have I missed something ?

@brampf
Copy link
Owner

brampf commented Jul 20, 2023

Hi,

I haven't given this code a look for a long time, but I think you might be right. That line seems to compare apples with oranges. I remember that I was always unhappy with the verification code and created a branch to fix this (https://github.com/brampf/fitscore/tree/verify). But I believe I abandoned that branch, but cannot remember what was the reason.

@brampf brampf added invalid This doesn't seem right bug Something isn't working and removed invalid This doesn't seem right labels Jul 20, 2023
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

2 participants