-
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
Position keyword now adds position variables in PICMI ParticleDiagnostic #4721
Position keyword now adds position variables in PICMI ParticleDiagnostic #4721
Conversation
Python/pywarpx/picmi.py
Outdated
@@ -2457,7 +2458,7 @@ def diagnostic_initialize_inputs(self): | |||
variables.add('Bx') | |||
variables.add('By') | |||
variables.add('Bz') | |||
elif dataname in ['ux', 'uy', 'uz', 'Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz']: | |||
elif dataname in ['x', 'y', 'z', 'ux', 'uy', 'uz', 'Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz', 'Er', 'Et', 'Br', 'Bt']: |
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.
What about the current variables j
, though?
I don't quite see why they are missing.
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.
We do not anymore have an E or B field on the particle itself.
(For j we never had it.)
Prior to recently, the `'position'` string in the input of the PICMI `ParticleDiagnostic` did not add the positions because they were written out automatically. That has been changed and so we are adding them to the list of variables now. Also added the class `LabFrameParticleDiagnostic` to the docs.
- in picmi.py, the dimensions were not checked and so it would try to add variables that do not exist for a species in a lower dimension - in examples, some coordinates were named wrongly for lower dimensions than 2 but it did not matter before since positions were added automatically
9e16831
to
43949fb
Compare
Opening and closing because CI test for HIP failed with a timeout while installing dependencies |
As our documentation states, adding the string
'position'
to thedata_list
parameter of PICMI'sParticleDiagnostic
should add position variables. This was true by default until recently but now positions can actually be left out and are not written automatically, anymore.This PR also symmetrizes the list of accepted variables between the
LabFrameParticleDiagnostic
and theParticleDiagnostic
classes while adding the former to the documentation.