Open ax3l opened 5 years ago
@ChristopherMayes whats the version of h5py
you are using? python -c "import h5py; print(h5py.__version__)"
My software environment:
Thanks for bug report. I could reproduce it. Working on a fix.
I have: HDF5: 1.10.4 h5py: 2.9.0 macOS Mojave (latest) python 3.6.8
Fixed
It runs, but does not create the output file (test.h5): python gdf_to_hdf.py examples/example_1.gdf test.h5
Also, I had to add .py to the name of the script. The README has: python gdf_to_hdf examples/example_1.gdf examples/example_1.h5
oops) now, it should work
*now? :)
Okay, looks like it works now. And, it works on my own gpt files.
However, it doesn't look like the units are right for momentum. What units are they supposed to be? From what I can tell, momentum/x is being set to gamma*beta_x, which is dimensionless.
MKS units should be kgm/s, with a proper factor to convert p_x = massc_lightgammabeta_x
How are the origin units in the GDF file again? Are they CGS, Lorentz-Heaviside CGS or something different? Looks like we add proper dimension meta data but don't scale unitSI
accordingly yet.
GPT normally records relativistic gamma and beta vector components, labeled: G Bx By Bz
Proper momentum/x would be: mass cLight G Bx
For an electron, m_e c = 2.73092449 10^-22 kg m / s
Excellent, that's just what we have to put in unitSI
.
@KseniaBastrakova for particles, the particleName/
group seems to be still missing when I run the GDF to HDF5 converter. Can you please run the validator after adding it to verify?
During convert, we can either keep unitSI
to 1.0
and convert each momentum with each given mass
, since we copy the data anyway, or we sort out by same-mass to create individual particle species and put m_species c
in the unitSI
.
Thanks for bug report. I could reproduce it. Working on a fix.
Fixed. I added m_species c in the unitSI. And for parclename/ i implemented classification into electrons, protons and electrons. (As advice by @BeyondEspresso)
Hi @KseniaBastrakova,
@ChristopherMayes tries to use the example script and it seems not to work. Can you please assist him? I can confirm the error he reports when trying the examples.
Thanks, Axel