Skip to content

Set ".shot" attribute of Equilibrium when loading using io.compass.cdb() #56

@hetsko

Description

@hetsko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions