Skip to content
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

emd import does not support default dim attributes #42

Closed
elifino opened this issue Jun 27, 2022 · 3 comments · Fixed by #43
Closed

emd import does not support default dim attributes #42

elifino opened this issue Jun 27, 2022 · 3 comments · Fixed by #43

Comments

@elifino
Copy link

elifino commented Jun 27, 2022

From https://emdatasets.com/format/, it's specified that the "name" and "units" attributes on dimensions are not required and will be set to defaults if not present:

"Without these attributes, the viewer will still function but data processing routines may fail or produce incorrect results."
"Without the “name” and “units” attributes, the EMD viewer program can still parse the file, and these fields will default to numerical dimensions and pixels respectively. The “version” attribute is important for programs to validate which version of the EMD specification they are using before processing the data."

fileEMD.get_emddims() does not implement this, however. If for example the "units" attribute is missing, it throws an exception which is caught and turned into a text output warning that the data set "does not seem to be in emd specified shape"

@ercius
Copy link
Owner

ercius commented Jul 2, 2022

Thanks for the notice. Without properly formatted dims datasets are not very useful for analysis. I can see how it would be good to be able to catch this exception instead of being stuck without an easy way to read the data. Ill look at fixing that for the next release.

@elifino
Copy link
Author

elifino commented Jul 5, 2022 via email

@ercius ercius mentioned this issue Jul 10, 2022
@ercius
Copy link
Owner

ercius commented Jul 10, 2022

closed by #43

@ercius ercius closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants