xraypy / xraylarch

Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging, and more.
https://xraypy.github.io/xraylarch
Other
127 stars 62 forks source link

Improvements for working with HDF5/BLISS files at BM16/ESRF #463

Closed maurov closed 9 months ago

maurov commented 9 months ago

@newville

This fixes HDF5 locking issues when working with BLISS at our beamline, but should be helpful for everybody. I still need to include a couple of improvements required from users last week, so I keep this as draft for a week or so. I would like to have it included in the next larch release (with #458 too).

maurov commented 9 months ago

A couple of things to add before merging this:

maurov commented 9 months ago

@newville I wanted to add two more features, but this is taking longer than expected, so I propose to merge like this and release 0.9.72, if it is fine for you.

By the way, I wanted to implement __enter__ and __exit__ in DataSourceSpecH5 in order to keep the file open as short as possible, but I do not understand why it is not working. If you have an idea for improvement, please, feel free to modify it.

newville commented 9 months ago

@maurov Thanks!