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

Enable different types of diagnostics for ParticleDiagnostic() in Python #4720

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

EyaDammak
Copy link
Contributor

@EyaDammak EyaDammak commented Feb 22, 2024

This PR enables to have the file of ParticleDiagnostic with different type ("Full", "BoundaryScraping" or "BackTransformed").
This is possible in adding the option warpx_diag_type in picmi.ParticleDiagnostic()
The option warpx_diag_type='Full' is set by default.

@EyaDammak EyaDammak changed the title Enable the diagnostic type ParticleScraping in Python Enable the different types for ParticleDiagnostic in Python Feb 22, 2024
@EyaDammak EyaDammak changed the title Enable the different types for ParticleDiagnostic in Python Enable different types of diagnostics for ParticleDiagnostic() in Python Feb 22, 2024
@EyaDammak EyaDammak changed the title Enable different types of diagnostics for ParticleDiagnostic() in Python [WIP] Enable different types of diagnostics for ParticleDiagnostic() in Python Feb 22, 2024
@EyaDammak EyaDammak changed the title [WIP] Enable different types of diagnostics for ParticleDiagnostic() in Python Enable different types of diagnostics for ParticleDiagnostic() in Python Feb 22, 2024
@ax3l ax3l added the component: Python Python layer label Feb 23, 2024
@@ -2404,6 +2404,7 @@ class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic, WarpXDiagnostic
def init(self, kw):

self.format = kw.pop('warpx_format', 'plotfile')
self.type = kw.pop('warpx_diag_type', 'Full')
Copy link
Member

Choose a reason for hiding this comment

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

Awesome, great work!

Can you please just a few lines above, in the documentation string, add an entry for the new warpx_diag_type option? That way it will be shown in our manual automatically and users will find it.
https://warpx.readthedocs.io/en/latest/usage/python.html#diagnostics

@@ -2383,6 +2383,9 @@ class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic, WarpXDiagnostic
warpx_format: {plotfile, checkpoint, openpmd, ascent, sensei}, optional
Diagnostic file format

warpx_diag_type: {Full, BoundaryScraping, BackTransformed}, 'Full' by default, optional
Copy link
Member

Choose a reason for hiding this comment

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

Hm, allowing BackTransformed makes it confusing, since this seems to duplicate the capability of LabFrameParticleDiagnostic... We can discuss this in more detail.

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

Successfully merging this pull request may close these issues.

3 participants