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

Nion and dm3reader, with examples. #2

Merged
merged 3 commits into from
Sep 11, 2020
Merged

Conversation

gduscher
Copy link
Member

@gduscher gduscher commented Sep 8, 2020

No description provided.

@ssomnath
Copy link
Member

ssomnath commented Sep 8, 2020

@gduscher - it might be great to show one example of how one might use a reader. I do not think we need one example per file type or reader since the procedure is pretty much the same. Otherwise ready to merge

@gduscher
Copy link
Member Author

gduscher commented Sep 9, 2020

Hi Suhas,
I was not sure how you wanted that done,
I was thinking also towards a unit test of the readers. The dm3_reader example is the one most people could use.

Also, I actually collected two readers in one for Nion. I don't think that is how this should go.
May be, we should have one reader per file type and then one reader that differentiates depending on extension?
Something like a TEM_reader?

Deleted nion_reader_example per request of Suhas
Deleted nion_reader_example per request of Suhas
Cleaned-up some code
Plotting works only with sidpy
@ssomnath
Copy link
Member

@gduscher -

Good question on the boundaries / scope for each Reader. In theory, one could have a Reader that can read multiple extensions if the code for them was indeed similar. Such a Reader would need to say that it can indeed read multiple files via the can_read() function. I do not see this happening all that frequently. Therefore, it may be best to have one Reader per file extension.

Why do you have two readers for Nion? Are these for dramatically different experiment modalities? Are the file extensions the same or different?

You have a good point about having one "reader" that differentiates depending on file extension. I have written such code for pycroscopy in the past here. This is now a formal issue on ScopeReaders as well - #7.

I think it would be a great idea to have tests for these readers by identifying one or two tiny files that can be tested for each Reader classes.

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 this pull request may close these issues.

Migrate Translators in Pycroscopy to ScopeReaders Example on how one would use a Reader class
2 participants