gafusion / omas

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

Unable to pull omas from MAST uda #243

Closed jmcclena closed 1 year ago

jmcclena commented 1 year ago

omas uda example (https://gafusion.github.io/omas/auto_examples/omas_uda_example.html) is not working for me add the from omas_uda import load_omas_uda line:

from omas import *
from omas_uda import load_omas_uda
from pprint import pprint

# MAST UDA server (restricted access)
server = 'idam0.mast.ccfe.ac.uk'
port = 56563

pulse = 30420

ods = load_omas_uda(server=server, port=port, pulse=pulse, paths=['magnetics'])

pprint(ods.pretty_paths())

The example returns an empty ods. Uncommenting out the try-except in the get_uda routine, I see the follow error:

Traceback (most recent call last):
  File "/common/projects2/physics/omfit/atom-freia/OMFIT-source_unstable/omfit/omfit_classes/OMFITx.py", line 4620, in manage_user_errors
    tmp = command(**kw)
  File "/common/projects2/physics/omfit/atom-freia/OMFIT-source_unstable/omfit/utils_tk.py", line 1180, in GlobLoc_tk
    return py.run(_relLoc=self.namespace, _OMFITscriptsDict=False, _OMFITconsoleDict=True, noGUI=None)
  File "/common/projects2/physics/omfit/atom-freia/OMFIT-source_unstable/omfit/omfit_classes/omfit_python.py", line 1105, in run
    result = self.__run__(**kw)
  File "/common/projects2/physics/omfit/atom-freia/OMFIT-source_unstable/omfit/omfit_classes/omfit_python.py", line 953, in __run__
    tmp = execGlobLoc(
  File "/common/projects2/physics/omfit/atom-freia/OMFIT-source_unstable/omfit/omfit_classes/omfit_python.py", line 129, in f_locked
    return f(*args, **kw)
  File "/common/projects2/physics/omfit/atom-freia/OMFIT-source_unstable/omfit/omfit_classes/omfit_python.py", line 376, in execGlobLoc
    exec(compile(execString, filename, "exec"), GlobLoc)
  File "/tmp/ql0457/OMFIT/OMFIT_2023-03-24_16_47_12_055799/project/OMFIT command box #1", line 6, in <module>
    udasignal = client.get("magnetics", uda_path)
  File "/common/projects/physics/omfit/atom-freia/miniconda3_9/lib/python3.9/site-packages/pyuda/_client.py", line 170, in get
    result = cpyuda.get_data(str(signal), str(source))
  File "pyuda/cpyuda/cpyuda.pyx", line 106, in cpyuda.get_data
cpyuda.ServerException: Protocol 11 Error (Server Block #1)

Any suggestions @orso82

jmcclena commented 1 year ago

Okay, I think I'm making progress by setting server and port to None

orso82 commented 1 year ago

Are you running locally at MAST?

jmcclena commented 1 year ago

yes, running locally on MAST. Fixing fix a few small bugs with omas_uda, the magnetics ods is now populating. It looks like there is only data for the locations, but no timetrace data. Is that what you remember?

orso82 commented 1 year ago

You must reach out to the people in charge of IMAS and UDA there to see exactly what they map. Jonathan Hollocombe is a good contact.

github-actions[bot] commented 1 year ago

Stale issue message