C ++ HSPY File Writer #325
Replies: 3 comments 1 reply
-
@noemiebonnet @pieleric @Attolight-NTappy a discussion possibly relevant for your companies as you at least have reader implementations for RosettaSciIO/HyperSpy |
Beta Was this translation helpful? Give feedback.
-
Thanks for tagging me!
Indeed, also if you need something resembling (firm) real-time assurances, this is a lot easier with C++/Rust than Python.
I'm working on adding zarr/zspy support to LiberTEM-live, meaning any detector detector we support will be able to directly produce zspy soon. So that would be implementation number three. I think it should be easy enough to support the general structure of zspy files, from my perspective. It could be helpful to have a small acceptance test that checks the structure, basically an executable version of the textual description, which might catch subtleties that are not expressed in the language here: rosettasciio/rsciio/zspy/_api.py Lines 42 to 67 in 3c7b9f6 I think the more challenging part would be writing the metadata tree and keeping that consistent between implementations. See also this previous discussion. I think most helpful would be to have a formal source of truth, like a schema, that documents the metadata attributes in a clear way.
I think the options are BSD/MIT where you would get a notice in the docs or somewhere in a menu of the application. (A)GPL might be a hard sell to most commercial users, from my experience.
If there is interest, I would be happy to collaborate on a rust library, with a C or C++ API (and Python?) on top for integration into other software. The argument for rust would be that it's IMHO easier to write correct rust code compared to C++, and with PyO3 there is a really good option for building Python bindings. |
Beta Was this translation helpful? Give feedback.
-
Thanks for tagging me in this discussion! We really like the In the future, there could be use cases where writing data to that format directly would be interesting. However, I am not certain that licensing conditions (also of hdf5 data standard) allow to do this easily. |
Beta Was this translation helpful? Give feedback.
-
Direct Electron has a (partial) c++ implementation for writing to the
.hspy
file format as well as for the DE5 file format (a varient of the.emd
file format). Something that I would like is to improve the ability for companies to write directly into the.hspy
file format as well as to the.emd
file format (and eventually into the.zspy
file format).As far as performance goes, I don't know if there is much difference from C++ --> python but I think in many instances a c++ implimentation should be better able to integrate with different aquisition softwares.
I'd be curious to hear peoples thoughts on the subject?
.hspy
/.zspy
/emd
file?Beta Was this translation helpful? Give feedback.
All reactions