gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
30 stars 15 forks source link

allow different memory backends in OMAS #143

Closed orso82 closed 2 years ago

orso82 commented 3 years ago

For much of what we have done so far, IDSs data was stored in OMAS in Python structures, and then moved it in/out of IMAS only when needed. This PR allows OMAS data to be stored directly in IMAS (ie, avoiding copy of data from Python structures and IMAS). Indeed the new storage requires IMAS to be installed.

image

# Define the memory backend when the ODS is created
ods = ODS(backend='imas')

# put in some data
ods['equilibrium.ids_properties.homogeneous_time'] = 1

# use `.ids` to access IMAS data structure
equilibrium_ids_in_imas = ods['equilibrium'].ids

# for example:
in_omas = ods['equilibrium.ids_properties.homogeneous_time']
in_imas = ods.ids.equilibrium.ids_properties.homogeneous_time
smithsp commented 3 years ago

Mention @olivhoenen . This is where the IMAS memory version is being developed.

Karel-van-de-Plassche commented 3 years ago

Could we leverage the new (just delivered) IMASPy backend paradigm here @orso82? I'm not sure when IO is ready to switch from IMAS Python HLI to IMASPy, but more testers could help this along.

github-actions[bot] commented 2 years ago

Stale pull request message