Skip to content
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 ".shot" attribute of Equilibrium when loading using io.compass.cdb() #56

Open
hetsko opened this issue Oct 27, 2022 · 0 comments
Open

Comments

@hetsko
Copy link

hetsko commented Oct 27, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant