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

moire lattice in Crystal #514

Merged
merged 10 commits into from
Oct 22, 2023
Merged

moire lattice in Crystal #514

merged 10 commits into from
Oct 22, 2023

Conversation

sezelt
Copy link
Member

@sezelt sezelt commented Aug 29, 2023

This should be a cleaned up and non-conflicting version of #511

This version is formatted and does not contain any changes to the CrystalPhase workflow.

Needs testing

@cophus
Copy link
Member

cophus commented Aug 30, 2023

Testing notebook for Moire:
Moire_test.zip

Example of the output:
image

@sezelt sezelt marked this pull request as ready for review September 1, 2023 15:42
@sezelt
Copy link
Member Author

sezelt commented Sep 1, 2023

This works with the example notebook and should be ready for review

@sezelt
Copy link
Member Author

sezelt commented Oct 6, 2023

The fix @alex-rakowski made should fix the one failing check on the docs, so it should be okay to merge with that one failing. Also if we push new commits (or even just an empty one) the run will trigger again and we can know for sure. In the dev meeting I believe @gvarnavi was volunteered to review this

Copy link
Member

@gvarnavi gvarnavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall, but I think the function should be split in two functions to be more consistent w/ the generate/plot scheme of the rest of the diffraction module.

This requires the generate function to return some information on the thresholded and rotated parent classes. Here, I simply return them as different PointLists

Usage now looks like this:

bragg_parent_0, bragg_parent_1, bragg_moire = generate_moire_diffraction_pattern(
    bragg_peaks_WSe2,
    bragg_peaks_Te,
    k_max = 0.65 ,
    
    exx_1 = 0.0,
    eyy_1 = 0.05,
    exy_1 = 0.0,
    phi_1 = np.deg2rad(2),
)

fig, ax = plot_moire_diffraction_pattern(
    bragg_parent_0,
    bragg_parent_1,
    bragg_moire,
    
    k_max = 0.65,
    plot_subpixel = True,
    labels = ['WSe$_2$', 'Te'],
    returnfig=True,
)

py4DSTEM/process/diffraction/crystal_phase.py Outdated Show resolved Hide resolved
py4DSTEM/process/diffraction/crystal.py Outdated Show resolved Hide resolved
@sezelt
Copy link
Member Author

sezelt commented Oct 18, 2023

@gvarnavi do you approve this in its current state? I can't review it on GitHub because I am the author of the PR

Copy link
Member

@gvarnavi gvarnavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Although I believe @cophus wanted to have one final look?

@sezelt sezelt merged commit 1b9199c into py4dstem:dev Oct 22, 2023
6 checks passed
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.

3 participants