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

Rewriting Libraries (structure and diffraction) #135

Closed
pc494 opened this issue Oct 18, 2020 · 3 comments
Closed

Rewriting Libraries (structure and diffraction) #135

pc494 opened this issue Oct 18, 2020 · 3 comments

Comments

@pc494
Copy link
Member

pc494 commented Oct 18, 2020

(again, things from pyxem/pyxem#654)

Both are currently strange, my feeling is that structure would be best as:

{'phase_a':{'structure':@,'orientations':orientation_list}}

and diffraction (maybe renamed to orientation_diffraction) as

{'phase_a':{(alpha,beta,gamma):{'simulation':@,'intensities':@,'coords':@}}
@hakonanes
Copy link
Member

I guess these are quick thoughts you will elaborate on later... I'm confused why dictionaries are better than classes?

@pc494
Copy link
Member Author

pc494 commented Oct 19, 2020

you guess correctly, it's the ordering of the nesting. Currently diffraction library is

{'phase':{'orientations':listoftuples,'simuluations':listofsimulations}}

which sort of makes sense if you think you can vectorize over them, but given that we can't at the moment I felt like the form described helps to write easier to read code.

@pc494 pc494 added this to the future milestone Jan 11, 2022
@hakonanes hakonanes removed this from the future milestone Jan 11, 2022
@hakonanes
Copy link
Member

The setup and handling of spot pattern simulations was changed in #205, so I assume this can be closed. Please re-open if I'm wrong.

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

No branches or pull requests

2 participants