-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
These results usually correspond to particles that leave the box, or are filtered out (temporarily) by the filter function |
Beta Was this translation helpful? Give feedback.
-
Thanks @mccoys for your reply, I think as the boundaries are periodic, particles will not leave the box, In this case, how can I trace a particle energy that for example initially 5<pz<6. Cheers |
Beta Was this translation helpful? Give feedback.
-
Yes the times where the particle is out will be filled (by happi post-processing) with either 0 or NaN. If you want to filter particles at the initial timestep, and keep track of those at later times, I suggest you read https://smileipic.github.io/Smilei/Use/ids.html |
Beta Was this translation helpful? Give feedback.
-
Thanks @mccoys for your explanations, I tried to set filter as:
but I receive following error: On rank 0 [Python] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()ERROR src/Diagnostic/DiagnosticParticleList.cpp:195 (run) A DiagTrackParticles filter has not provided a correct result I would be thankful for your help. Cheers |
Beta Was this translation helpful? Give feedback.
-
Several issues here
|
Beta Was this translation helpful? Give feedback.
-
Thanks @mccoys for your reply and the detailed explanations. Cheers |
Beta Was this translation helpful? Give feedback.
Several issues here
return False
as smilei requires that you return an array of booleans of the same size as the particle array. Instead do something likep.id[p.pz>300] += 2**63