Skip to content

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
.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