Moves to mdsthin libi + ssh

Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
2024-12-23 12:55:26 +00:00
parent 0b5f14234f
commit 18846ddcb0
3 changed files with 227 additions and 4 deletions

25
Analysis/mdsClient.py Normal file
View File

@@ -0,0 +1,25 @@
""""
"""
import mdsthin
class mdsClient():
"""
Models
"""
def __init__(self, host='epics.ipfn.tecnico.ulisboa.pt'):
"""
Initializes the MDSPlus thin Connection
"""
self.conn = mdsthin.Connection(f'ssh://{host}')
def openTree(self, tree='isttokmarte', shot=51608):
self.conn.openTree(tree, shot)
def getData(self, node):
return self.conn.get(node).data()
def getTime(self, node):
# print('dim_of({})'.format(node))
return self.conn.get('dim_of({})'.format(node)).data()