-
|
Hello everyone, Could you help me with a simple question I'm still unclear on? Let's say I want to count the number of electrons at a given time (it = 13) by integrating over all energies, and only for the region pz > 0, z > z_foc + 10 * l0. and I get Am I right in this approach? (Particle count below expected) Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Please do not make an issue to ask a question. Use discussions I don't understand why you sum energies when you just want a number. Just count the size of the array. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for asking my question in the wrong place. |
Beta Was this translation helpful? Give feedback.
-
|
Since this might be useful to someone, I leave my answer here. This applies when you use happi to read a ParticleBinning file. Thus, you can undo happi's actions when it reading the data. |
Beta Was this translation helpful? Give feedback.
Ah ok you want a number of real particles. Sorry I misunderstood
If you are in 2D or 1D, then you have no way to get a number of particles in a well defined way. I suggest to use happi 's average option to sum over axes then check the units you obtain. You should only need to multiply by a volume. Happi takes into account the summing, the bin size, even when non uniform. It just does not work if you have custom axes but that is not your case