-
Notifications
You must be signed in to change notification settings - Fork 17
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
readblock! outputs values in wrong positions #192
Comments
ooh interesting, thanks Lazaro! Good to know that it's a DiskArrays thing. Curious that NetCDF.jl also has the same problem with the |
The main issue is that heatmap seems to fall back to reading a DiskArray through the iterator interface. That means the data is looped through chunk by chunk while Makie is assuming it goes through normal julia iteration order, A small reproducer would be this one: using DiskArrays.TestTypes
using GLMakie
data = [i+j for i in 1:200, j in 1:100]
da = AccessCountDiskArray(data, chunksize=(10,10))
heatmap(da) while the following plot would be correct: heatmap(da[:,:]) A solution to the problem at hand would be to read the data into memory before plotting |
This is a more general issue with Should collect specifically return what one would expect on a diskarray, instead of looping chunk-wise? |
No
|
Hmm, looks like heatmap's convert_args call |
OK, I have a smaller MWE: map(identity, parent(ds["DQF"])) gives me a bad heatmap.
This is a more general problem, because |
Shouldn't |
According to |
Ah this is #144 again, I hadn't seen that issue |
Oh right we didn't actually fix that 😭 |
I don't have access to YAXArrays on my current system, but I tested with Rasters/DD/DiskArrays latest, and this is indeed working. Probably fixed by #198. |
As of this version, the output of this looks wrong.
using the file from here
But, it also happens for other .tif and .nc chunked files.
This looks to happened only when the data is stored into multi chunks, then the reading of those gets corrupted. If is only one, then no issue, or if we use
ds["DQF"].data[1:2000, 1:2000]
is also fine.DiskArrays 0.4.4
DiskArrays 0.3.23 Outputs the correct array
see also, rafaqz/Rasters.jl#735
The text was updated successfully, but these errors were encountered: