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 ODS from ids objects #282

Closed
wants to merge 69 commits into from
Closed

Conversation

AreWeDreaming
Copy link
Collaborator

Leaf of #258.
Allows an ODS to be set using an IDS (not database) object.
Example syntax

ods = load_omas_imas(paths=omas_paths,
                                     imas_version=os.environ["IMAS_VERSION"], 
                                     ext_ids=ids)

with omas_paths a list of IMAS paths in the form of equilibrium.time_slice.0.profiles_2d.0.psi and ids in this case an instance of imas.equilibrium() with data.
Limitations:

  • Does not allow automatic discovery, i.e. only works if paths is set
  • Does not allow broadcasting, e.g. equilibrium.time_slice.:.profiles_2d

- This my crude attempt to allow mapping between
rho_pol_norm <-> rho_tor_norm
- This also includes phi
- I qualitatively tested rho_pol_norm -> rho_tor_norm
- Might have some COCOS issues
- Probably overly complicated
- Needs dynamic fetching of `phi` and `rho_pol_norm`
- Tested against mapping form OMFITprofiles
- Results are OK by eye. Numerical verification still pending.
- Results seem good now
- Plus 2 missed density_thermal
@AreWeDreaming AreWeDreaming changed the title Imas set for ids objects Set ODS from ids objects Dec 12, 2023
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant