-
Notifications
You must be signed in to change notification settings - Fork 74
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
FIO file read support #3539
FIO file read support #3539
Conversation
Great! Thanks for the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks againfor the PR!
I made a few minor comments.
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
…e on FioH5 init. Add fixed length str read for h5py < 3.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks again for the PR!
Great, I guess this |
Hello everybody,
as discussed in issue #3438 I have further improved my code, which allows silx.io to read FIO files generated by DESY beamlines.
This PR includes:
There are also small changes to the common silx.io packages, which allow the fio files to be opened with silx.io.open and silx convert.
While writing the code, I have encountered some issues with string datatypes.
In particular, there seems to be no matching datatype in silx for the h5py type "variable length strings" in 1d h5-like datasets. This is not really surprising since all data (in for example spech5) is internally stored as numpy arrays and those only support fixed length strings. My current solution is to read these data as python objects, which seems to work fine. But this might cause issues in the future. Is there a better solution?
Edit (after properly reading the h5py documentation ;) ):
The usage of the
'O'
dtype is the recommended way of reading variable length strings for h5py as of version 3.0. So everything is fine.I have also added support for the old API (< 3.0) in 421f70f.
I hope that you are happy with my first PR.
Best regards,
Timo