-
Notifications
You must be signed in to change notification settings - Fork 22
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
Big-endian data is wrongly decoded and therefore wrongly plotted #1421
Big-endian data is wrongly decoded and therefore wrongly plotted #1421
Comments
@axelboc, Please take a look on it. Thanks. |
Hello, This is indeed a problem with h5wasm. I will report it to the maintainer and see what we can do. The file appears to be displayed fine with h5grove: https://h5web.panosc.eu/h5grove?file=spm_test_output.test.nxs |
To be more precise about this, the issue stems from the fact that the data is stored with big-endian floats. So it is possible to circumvent the issue by storing the data with little-endian floats instead. |
I think it's probably most efficient to let the HDF library handle this conversion - I can try to make sure all values are read out to little-endian (even if stored big-endian) |
Up to you, I'll leave this to your expertise 😄 |
@loichuder, Thanks a lot for such a repartee. Still, there are at least two issue to be resolved:
|
Not sure I understand your point here. I redid the plot with matplotlib with
It depends in which way you are using H5Web:
|
Thanks for support. Yes, I got the plot just now but in Firefox, but when I was writing my last comment, I check it in Chrome. The right->Firefox and left->Chrome. In that case there a new issue for different browsers. The original issue has been evolved in jupyter-lab. Here, is the python lib installation relevant with jupyterlab and h5*:
|
note that, the same plot has been found for jupyterlab in Chrome and Firefox. |
There's a fix in the main branch of h5wasm, but I haven't made a release yet (there are some other new features, and I haven't written the documentation yet) |
v0.4.11 released just now should fix the problem |
Oooh, interesting. The same issue found for I will have a look at it. |
@RubelMozumder It should be fixed by the latest Jupyterlab-h5web version (7.1.1) Thanks for the report ! |
@loichuder Thank you very much. I hope it will be fixed and I will try it. Unfortunately, I could not try it yet. |
Describe the bug
The values of numpy array elements are being change abruptly. For example, the real numpy arrays are [[-2.6798e-08, -2.67987e-08, -2.67994e-08, -2.68001e-08..]] which is represented as [[3.205e+18, −8.250e+20, ...]]. The plot does not make any sense and does not contain any important information.
I tried to check this file in h5wasm https://h5web.panosc.eu/h5wasm and got the same behavior as mentioned above.
To Reproduce
Here in the attached zip file I have attache a screen shot of a data set plotted by matplotlib.
And a nexus output file (.nxs) which can be plot by h5wasm web application.
Degug-20230418T085917Z-001.zip
Expected behaviour
The expected behavior for a data set from several datasets has been added in the zip file.
Screenshots
In zip file
Context
Version 112.0 (64-bit)]
The text was updated successfully, but these errors were encountered: