Currently, Equilibrium object loaded via pleque.io.compass.cdb() has .shot=0. This then causes further minor inconveniences such as the loss of this metadata when writing the equilibrium into a file, e.g. to_geqdsk(). While I usually depend on the filename to store this metadata (shot number and time) I feel like it would be nice to have this additional backup given that this is already a feature of the eqdsk format.
Proposal for fix:
Probaly just add something like
# Accessing `sig_ref` instead of parameter `shot` should handle cases when user uses `shot=None`
eq.shot = sig_ref.record_number
added just below
|
eq = read_efithdf5(data_ref.full_path, time=time) |
Proposal for further investigation:
- Might be worth to look into the other
io options (such as cudb) and how they handle the shot attribute, potentially fix them as well
Currently,
Equilibriumobject loaded viapleque.io.compass.cdb()has.shot=0. This then causes further minor inconveniences such as the loss of this metadata when writing the equilibrium into a file, e.g.to_geqdsk(). While I usually depend on the filename to store this metadata (shot number and time) I feel like it would be nice to have this additional backup given that this is already a feature of the eqdsk format.Proposal for fix:
Probaly just add something like
added just below
pleque/pleque/io/compass.py
Line 40 in a414deb
Proposal for further investigation:
iooptions (such ascudb) and how they handle theshotattribute, potentially fix them as well