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
While it was originally written as a migration utility from buggy obsolete pyfits checksums to standard FITS checksums, fitscheck was also designed as a utility simply for working with standard checksums. It could check, add, remove, or correct FITS checksums in the standard form from the command line. Whether they were correct or incorrect, missing or present. No python shell or coding required.
Sometime since 2010, fitscheck lost the ability to correct standard checksums. Checking still works, but not corrections or removals of bad checksums.
I doubt it's used much so it should probably be deprecated and/or dropped. However, another option is to fix checksum updates. Any logic related to "nonstandard vs. standard" checksums can be dropped, it addressed a problem that is long gone.
It would be useful to have a more precision description of what doesn't work. There are a few related issues (#5874, #5875, #5902, maybe other) but it's not clear to me what exactly is broken (and I guess it's not only in fitscheck ?).
About the nonstandard option, if I understand correctly it's here to support the old way of computing the checksum from PyFITS, so it's seems reasonable to remove this.
ping @embray, it would be super usedful if you have some time to explain a bit more the current behavior !
$ fitscheck --checksum standard --compliance --ignore-missing --write --force *.fits
I thought that would work anyway, and it appears to.
But rerunning the check, the errors remain, so the update failed somehow.
--checksum either
is the same, doesn't work.
I suspect the "migration" aspect of the script was little used or never used. So the entire "standard" vs. "non-standard" complexity might be something to deprecate or rip out.
Zipped test file or box-link to test file forthcoming.
I have looked at the code yesterday evening, and ... 😱
It's really broken, I'm working on a fix. I'm also tempted to remove the 'nonstandard' option by the same occasion, is it ok for you @MSeifert04@pllim ?
Activity
pllim commentedon Sep 9, 2017
Can you please give an example that used to work but does not anymore (and with the offending file if possible)? Did you use a command like stated in http://docs.astropy.org/en/stable/io/fits/usage/scripts.html#module-astropy.io.fits.scripts.fitscheck?
Verify and update checksums, tolerating non-standard checksums, updating to standard checksum:
saimn commentedon Sep 12, 2017
It would be useful to have a more precision description of what doesn't work. There are a few related issues (#5874, #5875, #5902, maybe other) but it's not clear to me what exactly is broken (and I guess it's not only in
fitscheck?).About the
nonstandardoption, if I understand correctly it's here to support the old way of computing the checksum from PyFITS, so it's seems reasonable to remove this.ping @embray, it would be super usedful if you have some time to explain a bit more the current behavior !
jaytmiller commentedon Sep 14, 2017
Sorry, I'm pretty surprised there was interest in fixing it.
I use it like this:
$ fitscheck ./*.fits
EXCEPTION './nrs_rnoise_nrs1_w_01.00.fits' .. Checksum verification failed for HDU ('SCI', 1).
1 errors
That seems fine.
Then I tried to correct like this:
$ fitscheck --checksum standard --compliance --ignore-missing --write --force *.fits
I thought that would work anyway, and it appears to.
But rerunning the check, the errors remain, so the update failed somehow.
--checksum either
is the same, doesn't work.
I suspect the "migration" aspect of the script was little used or never used. So the entire "standard" vs. "non-standard" complexity might be something to deprecate or rip out.
Zipped test file or box-link to test file forthcoming.
jaytmiller commentedon Sep 14, 2017
Test data is here: https://stsci.box.com/s/p3yatek64r19guls9hjeibj31w05vanh
saimn commentedon Sep 15, 2017
I have looked at the code yesterday evening, and ... 😱
It's really broken, I'm working on a fix. I'm also tempted to remove the 'nonstandard' option by the same occasion, is it ok for you @MSeifert04 @pllim ?
pllim commentedon Sep 15, 2017
I spoke to @jaytmiller who wrote the original script that went into PyFITS. Since he's okay with it, it's fine by me. Thanks!