Closed elifino closed 2 years ago
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.
Peter,
Yeah, I agree that the data is less valuable without the axes calibrated, but we still often run into cases where no calibrations are available, especially in diffraction mode. There can also be cases where the calibrations are unavailable at the time the file is written out but may be possible to determine later.
Best regards,
Bryan
From: Peter Ercius @.> Sent: Saturday, July 2, 2022 12:47 To: ercius/openNCEM @.> Cc: elifino @.>; Author @.> Subject: Re: [ercius/openNCEM] emd import does not support default dim attributes (Issue #42)
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.
— Reply to this email directly, view it on GitHub https://github.com/ercius/openNCEM/issues/42#issuecomment-1172951424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBIQDHEWWHLVO5SPFJFBFTVSCMEDANCNFSM5Z7RLYYA . You are receiving this because you authored the thread.[image: Image removed by sender.]Message ID: <ercius/openNCEM/issues/42/ @.***>
closed by #43
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"