-
Notifications
You must be signed in to change notification settings - Fork 200
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
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
Diagnostic type | ||
|
||
warpx_openpmd_backend: {bp, h5, json}, optional | ||
Openpmd backend file format | ||
|
||
|
@@ -2404,6 +2407,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') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
self.openpmd_backend = kw.pop('warpx_openpmd_backend', None) | ||
self.file_prefix = kw.pop('warpx_file_prefix', None) | ||
self.file_min_digits = kw.pop('warpx_file_min_digits', None) | ||
|
@@ -2426,7 +2430,7 @@ def diagnostic_initialize_inputs(self): | |
|
||
self.add_diagnostic() | ||
|
||
self.diagnostic.diag_type = 'Full' | ||
self.diagnostic.diag_type = self.type | ||
self.diagnostic.format = self.format | ||
self.diagnostic.openpmd_backend = self.openpmd_backend | ||
self.diagnostic.file_min_digits = self.file_min_digits | ||
|
There was a problem hiding this comment.
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 ofLabFrameParticleDiagnostic
... We can discuss this in more detail.