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

MR Reads: Zero->NaN Padding #334

Merged
merged 1 commit into from
Mar 4, 2022
Merged

MR Reads: Zero->NaN Padding #334

merged 1 commit into from
Mar 4, 2022

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Mar 4, 2022

Fill invalid field regions in MR with np.nan instead of zeros.

@RemiLehe on Slack:

matplotlib does handle np.nan gracefully:

  • For colormaps, it just shows white color
  • For line plots, it interrupts the curve at place where nan occurs.

Fill invalid regions with `np.nan` instead of zeros.
@ax3l ax3l added the feature label Mar 4, 2022
@ax3l ax3l requested a review from RemiLehe March 4, 2022 21:56
@@ -7,3 +7,4 @@ openpmd_viewer.egg-info/
.cache/
.eggs/
.vs/
__pycache__
Copy link
Member Author

Choose a reason for hiding this comment

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

Added because they keep showing up in my git status

@RemiLehe
Copy link
Member

RemiLehe commented Mar 4, 2022

This is working great:

  • 2D plots with get_field and plot=True:
    Screen Shot 2022-03-04 at 2 07 33 PM

  • 1D lineouts with get_field and plot=True:
    Screen Shot 2022-03-04 at 2 08 43 PM

@RemiLehe RemiLehe merged commit 21caaf6 into openPMD:dev Mar 4, 2022
@ax3l ax3l deleted the topic-mr-pad-nan branch March 4, 2022 22:17
@ax3l
Copy link
Member Author

ax3l commented Mar 4, 2022

Yay!! 🤩
Thanks for the test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants