-
Notifications
You must be signed in to change notification settings - Fork 51
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
set SI units #1622
Comments
It seems that set units should be applied to electrons["momentum"]['x'].unit_SI instead of electrons["momentum"].unit_SI. Just wanna check if that is correct. |
Hello, yes, the I also see a comment "This section I don't know how to implement" down in the file. Do you have a specific question there? Otherwise, the workflow is the same as for the other data, except that you specify weighting = electrons["weighting"][io.Record_Component.SCALAR]
weighting.reset_dataset(...)
weighting.store_chunk(w) |
For weighting how do I set the SI unit? I thought [io.Record_Component.SCALAR] declares that the last level is not needed, so I just applied unit_SI to the top level. This is the code I used. weighting = electrons["weighting"][io.Record_Component.SCALAR] |
That will work in the next version of openPMD-api (or to be more precise: |
Great, thanks for the clarification. |
I pip installed openpmd_api 0.15.2 and tried to do particle writing. I have attached the script I used down below. Setting Unit.si showed an error saying that 'openpmd_api.openpmd_api_cxx.Record' object has no attribute 'unit_SI'. Everything else works just fine.
boost along z.txt
The text was updated successfully, but these errors were encountered: