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

Update digital_dark_field.py #688

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Update digital_dark_field.py #688

merged 6 commits into from
Nov 20, 2024

Conversation

maclariz
Copy link
Contributor

Radius filtering separated as function, and radius-azimuth imaging added as separate function

Radius filtering separated as function, and radius-azimuth imaging added as separate function
fixed minor errors
Copy link
Member

@bsavitzky bsavitzky left a comment

Choose a reason for hiding this comment

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

Hi @maclariz - thanks for the PR and sorry for the delay. Please see the comments - I've requested two small docstring edits and one code edit for azimuthal ranges spanning a branchcut. Happy to get this pulled in once that's all squared - cheers :)

py4DSTEM/process/diffraction/digital_dark_field.py Outdated Show resolved Hide resolved
py4DSTEM/process/diffraction/digital_dark_field.py Outdated Show resolved Hide resolved
@maclariz maclariz requested a review from bsavitzky November 15, 2024 08:59
@maclariz maclariz marked this pull request as draft November 15, 2024 08:59
@maclariz maclariz marked this pull request as ready for review November 15, 2024 08:59
@maclariz maclariz marked this pull request as draft November 15, 2024 09:02
@maclariz
Copy link
Contributor Author

Now updated. Initially failed on code style but has been run through black and should now pass.

@bsavitzky
Copy link
Member

Hi @maclariz - i've just pushed commits updating the black formatting so that the PR will pass the linter. This adds changes to a number of other files that were not passing linting, which looks like it has to do with a version update to black. Sorry about that and please don't worry about the other files elsewhere in the package that are updated - this is all black formatting changes.

Aside from my branchcut comment, all looks good to me now. I see you've marked the patch as a draft, so I'll wait on merging until I hear otherwise from you.

Comment on lines +618 to +622
np.where(
np.logical_or(
radial_filtered_points_array[:, 6] < phi0,
radial_filtered_points_array[:, 6] >= phi1,
)
Copy link
Member

Choose a reason for hiding this comment

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

this still does not handle the branchcut issue (i.e. for data conditioned such that phi is e.g. in the range [0,360], you can't specify a range like [350,10] i.e. [-10,10] with this code). Let's call this is a quality-of-life / interface issue and you can decide if you want to update this now or later at your discretion; for now I'm ok pulling the code in if you're ok with this small interface issue

@maclariz maclariz marked this pull request as ready for review November 19, 2024 17:55
@bsavitzky bsavitzky merged commit 48d5eb6 into py4dstem:dev Nov 20, 2024
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.

2 participants