Repository navigation
test_compression_column_tforms failure with cfitsio 3.380 #4646
Description
Activity
@olebole - what was the previous version in Debian, and did it work correctly?
Previous version was 3.370 and it worked correctly.
@embray - is this something you would still have time to investigate in your spare time, or should one of the other core devs look into it?
I'll just note that the interface used to CFITSIO is rather fragile (see #3895 for more details). It can easily break with updates to CFITSIO in, in particular since it has to keep up with CFITSIO's internal structures, which it doesn't make much of an attempt at keeping stable or documented in any way.
#3895 would be a great GSoC project by the way.
Looking into the code of cfitsio, I think this is a problem with this test. In cfitsio, the function
ffuptf()updates theTFORMkeyword with the maximum length, which is actually calculated from the file.
There is no reason whyTFORM1should specify a length of 30 (except that previous versions of cfitsio probably did this) or 45. In principle any length should do it, so maybe the fix could just be testing against the regexpr'1TP\(\d+\)'? What do you think, @embray?I need to double check, but I think you may be right @olebole. The value that goes in those parens is just meant to be a hint, and there's no requirement that it be any specific value.
i have no idea why it would have changed from 30 to 45 though. Curious...
The change on the cfitsio side which caused this regression is the following one:
modified the 4 FnNoise5_(type) routines in quantize.c to correctly count the number of non-null pixels in the input array. Previously the count could be inaccurate if the image mainly consisted of null pixels. This could have caused certain floating point image tiles to be quantized during the image compression process, when in fact the tile did not satisfy all the criteria to be safely quantized.Basically the quantization was not done correctly in some cases (including the one in astropy), so fixing this issue changed the resulting compressed file, including the headers.
Therefore the suggested change looks to me the right way to fix the issue.
With the latest relase of cfitsio (which just entered Debian unstable), there are two test failures. The first one:
This may be a bug in cfitsio as well; I would need your hint here.
Full log here.
This happens on all architectures.