ComputationalRadiationPhysics / particle_reduction

5 stars 3 forks source link

Fix handling of macroWeighted attribute #10

Closed KseniaBastrakova closed 4 years ago

KseniaBastrakova commented 4 years ago

According to OpenPMD-standard, all records in pic-extension should have macroWeighted parameter,which indicates whether this quantity is written for the underlying particle. The input in reduction algorithms has to be in particles, not in macroparticles. There is't conversion from macroparticle quantities (macroWeighted = 1) to particle quantities now, that's not correct

sbastrakov commented 4 years ago

PIConGPU seems to have a similar issue in its merging plugins. E.g. here the momentum is already weighted as input, and generally it seems the plugin should operate on non-weighted momentum instead, and there are mismatches of weighted vs. non-weighted.

KseniaBastrakova commented 4 years ago

PIConGPU seems to have a similar issue in its merging plugins. E.g. here the momentum is already weighted as input, and generally it seems the plugin should operate on non-weighted momentum instead, and there are mismatches of weighted vs. non-weighted.

Yes, noticed that problem. I fix in my version of merging plugin, and it seems reasonable to fix this in the original plugin.