openPMD-viewer
openPMD-viewer copied to clipboard
Make multiplying with unit_SI optional
This PR adds the ability to change the unit conversion when reading in data.
By specifying units='SI' in OpenPMDTimeSeries(), the functions get_particle() and get_field() will output pure SI data.
'SI_u' (default) will give SI data but with normalized particle momentum, like how it is currently.
'raw' will ignore all unit_SI attributes. (but will still multiply the particle data with weighting if appropriate)
With this approach more unit systems can be added to read_species_data() in the future.
Related to #209