In [31]:
from phantasy.library.pv import DataSource
In [32]:
db = './config/FRIB_TEST/baseline_channels.sqlite'
url = 'https://127.0.0.1:8181/ChannelFinder'
In [33]:
ds1 = DataSource(source=db)
ds2 = DataSource(source=url)
In [34]:
data = ds1.get_data()
In [5]:
data[0]
Out[5]:
In [47]:
data_bpm = ds1.get_data(prop_filter=["*", ('elemType','BPM'),('elemField','Y')])
In [48]:
data_bpm[0]
Out[48]:
In [6]:
data = ds1.get_data(prop_filter='elem*')
In [7]:
data[0]
Out[7]:
In [8]:
data = ds1.get_data(prop_filter=[('elemHandle', 'readback')])
In [9]:
data[0]
Out[9]:
In [10]:
data = ds1.get_data(prop_filter=['elem*', ('elemHandle', 'readback')])
In [11]:
data[0]
Out[11]:
In [17]:
data = ds1.get_data(prop_filter=['elem*', ('elemHandle', 'readback')], tag_filter='phyutil.sys.LS1')
In [18]:
len(data)
Out[18]:
In [19]:
data = ds1.get_data(prop_filter=['elem*', ('elemHandle', 'readback')], tag_filter='phyutil.sys.FS1')
In [21]:
len(data)
Out[21]:
In [25]:
print("Current PV source address is {}, source type is {}".format(ds1.source, ds1.source_type))
In [26]:
ds1.source = url
In [27]:
print("Now PV source address is {}, source type is {}".format(ds1.source, ds1.source_type))
In [28]:
data = ds1.get_data(prop_filter=['elem*', ('elemHandle', 'readback')], tag_filter='phyutil.sys.LS1')
In [29]:
len(data)
Out[29]:
In [30]:
data[0]
Out[30]:
In [ ]: