pycroscopy / SciFiReaders

Tools for extracting data and metadata from scientific data files
https://pycroscopy.github.io/SciFiReaders/about.html
MIT License
13 stars 13 forks source link

HyperSpy object translation #29

Closed ssomnath closed 2 years ago

ssomnath commented 3 years ago

Functions to translate to and from HyperSpy's Signal objects to go into SciFiReaders (rather than sidpy). I realize now that we have two separate objectives in SciFiReaders:

  1. Readers for reading from files
  2. "Object Translators" (or give it another name) for going back and forth between in-memory objects.

How best do we organize the package then? Should we have a fork at the very top that splits between Readers and "Object Translators" or should we keep the existing modality-based organization and mix Readers with "Object Translators"? This is up for debate. I think it should be the former but could also work with the latter. I do not think it makes much sense to have a dedicated package just for "Object Translators"

ramav87 commented 3 years ago

Can we consider hyperspy objects to simply be a type of 'file'?

ssomnath commented 3 years ago

That is indeed one way of looking at it. The challenge is that we also need to accommodate code that does the reverse - take sidpy.Dataset and help you go out of the ecosystem.

gduscher commented 3 years ago

I added a hyperspy converter, to make it clear that it is not a file, but it is handled in the same way as a file.