-
Notifications
You must be signed in to change notification settings - Fork 3
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
New nionswift version broke library #3
Comments
Here is some example code that could be used to get this project running again. It requires nionswift 0.15.0 or later. It will take some further integration into this project to make it work, but it should not be too difficult. I decided to provide it here instead of a PR so that someone who knows how to use/test the final product can integrate it. NOTE: It will only load Swift 14 and 15 projects. It will probably work with projects from earlier versions. CAUTION: This code is a hack; it is likely to break in future versions of Swift. The permanent solution will be available when nion-software/nionswift#539 is implemented.
|
@cmeyer
with output:
Is there a plan for the for the future structure of data_item.properties? Will it be the same as the current version. The current structure needs some extra steps to get into an Pandas data frame format, because of the key 'metadata' contains a dictionary. |
@cmeyer @francisco-dlp |
@cmeyer |
@ltizei, it'll be easier to help you with this if you send a PR to this repository. |
I don't know exactly the intended behavior of this plug-in, but as for the Swift side of things, the You probably want to use And from what I understand, you might need to explicitly construct a pandas Series or DataFrame from the dict. I'm only starting to use pandas - but my intention is to have support for it directly in Swift (see nion-software/nionswift/issues/433). So I'd like to understand more about how you're using it eventually.
|
The behavior I am looking is to parse easily the data_items to select somes based on conditions. For example, if I am looking for all spectrum images (collection_dimension_count == 2), with CL (title contains 'CL'), spectra (datum_dimension_count==1), I would do this:
And I would get:
This makes automating tasks on parts of the whole dataset very easy. |
Just came across this project and wanted to use it but... |
The function _migrate_library() does not seem to exist in the nionswift version 0.15. Chris Meyer, the main developer of nionswift, has been made aware of this fact and said he will work towards a solution in the next release to keep hyperspy_swift_library working.
While waiting a solution, the library only works up to version 0.14.8 of nionswift.
The text was updated successfully, but these errors were encountered: