Skip to content

Remove fields from PICMI ParticleDiagnostic #3207

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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Python/pywarpx/picmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@ def add_diagnostic(self):
self.diagnostic = pywarpx.Diagnostics.Diagnostic(
self.name, _species_dict={}
)
self.diagnostic.fields_to_plot = 'none'
Copy link
Member

Choose a reason for hiding this comment

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

I saw that this PR was revived. I don't think this is the right place for this line since WarpXDiagnosticBase is used by all of the diagnostic classes. This setting would mess up Checkpoint since fields_to_plot shouldn't be set for it. Also, fields_to_plot is not used by ReducedDiagnostic. The better place for this statement is in ParticleDiagnostic after the call to self.add_diagnostic(), adding it this way

        if 'fields_to_plot' not in self.diagnostic.argvattrs:
            self.diagnostic.fields_to_plot = 'none'

bucket._diagnostics_dict[self.name] = self.diagnostic

def set_write_dir(self):
Expand Down