Conversation
Convert chunk coordinates back to elements so that retrieval from chunk map can succeed. Added comments to affected code, along with one coincidental spelling fix.
jamesmudd
left a comment
There was a problem hiding this comment.
This fix looks reasonable but would it be possible to add tests that would have caught this?
|
I'll take a look at your test system. This bug should occur on any read outside the first chunk. Such reads will return no chunk, or in very rare cases a completely wrong chunk. |
|
I briefly looked over the tests that involve chunks. At least in the case of ChunkSlicingTest, the bug is not revealed because the chunk size in the selected datasets is 1x1x1. For an effective test, it would be necessary to create a file with some larger, perhaps odd-sized, chunk. The existing test code is probably sufficient if chunked_v4_datasets.hdf5 were reworked a little. |
|
Thanks for investigating I think the existing test files should have suitable datasets already take a look at https://github.com/jamesmudd/jhdf/blob/master/jhdf/src/test/resources/scripts/chunked_v4_datasets.py |
|
I'm a little confused. I think what you mean is that chunked_v4_datasets.py should be modified so that the large_int16 datasets have a chunk size larger than 1x1x1. |
Fix scaling of chunk coordinates in ChunkedDatasetBase.findOverlappingChunks()