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

General solution for MDS+ run IDs and non-standard Trees #260

Closed
AreWeDreaming opened this issue Jul 31, 2023 · 5 comments
Closed

General solution for MDS+ run IDs and non-standard Trees #260

AreWeDreaming opened this issue Jul 31, 2023 · 5 comments

Comments

@AreWeDreaming
Copy link
Collaborator

There are already special cases at DIII-D for EFIT and PROFILES_tree (after #256 ) which are handled as special cases with dedicated keyword arguments. However, this is a much more general problem with can affect a lot more MDS+ trees.

Hence, the system that handles which MDS+ tree and pulse id (i.e. shot + run_id) is loaded should be generalized. The following snippet shows how a generic solution could look like

tree_dict = {}
tree_dict['equilibrium'] = ("EFIT", "01")
tree_dict['core_profiles.*'] = ("OMFIT_PROFS", "001")
tree_dict['core_profiles.global_quantities.v_loop'] = (None, None)
ods.open('d3d', 194844, options=tree_dict)

This would specify the tree locations based on ODS locations which is the natural way of defining them.
This will require some not insubstantial remodeling of omas_machine and related modules.

@github-actions
Copy link

Stale issue message

@AreWeDreaming
Copy link
Collaborator Author

@orso82 Any feedback on this?

@orso82
Copy link
Member

orso82 commented Oct 9, 2023

I don't really see the reason of making things more complicated.
Doesn't current system already allow you to handle all of this:

options = {}
options['equilibrium'] = "EFIT_01"
options['core_profiles'] = "OMFIT_PROFS_001"
options['core_profiles.global_quantities.v_loop'] = None

@pfbuxton
Copy link
Member

We have added extra options to the machine mapping files which allows for this.

We access data using syntax like this:

from omas import ODS
ods = ODS().open(
    'machine', 'st40',
    10009,
    options={
        'equilibrium_code_run': 'EFIT#RUN01',
        'core_profiles_code_run': 'ASTRA#RUN01'
    }
)

within the st40.json file we have entries like this:

 "equilibrium.time_slice.:.global_quantities.ip": {
  "COCOSIO": 11,
  "PYTHON": "equilibrium__tokamak_energy(ods, {pulse}, {equilibrium_code_run!r})"
 },
 "core_profiles.profiles_1d.:.ion.:.temperature": {
  "PYTHON": "core_profiles__tokamak_energy(ods, {pulse}, {core_profiles_code_run!r})"
 },

For equilibrium_code_run we have mappings to our MDSplus database for: EFIT, FreeGS, Fiesta, ASTRA, METIS, CHEASE, and CORSICA.

In my opinion: no changes need to be made to OMFIT source, just the local implementation.

Copy link

Stale issue message

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

No branches or pull requests

3 participants