updating snapshot and loading datasets

This commit is contained in:
2024-09-11 17:06:10 +02:00
parent 24cbccb6a6
commit 26eebc650b
5 changed files with 24 additions and 5 deletions

View File

@ -19,6 +19,7 @@ class SpectralAnalysis:
self.bs.stop()
self.channel = None
self.channels = [channel_dict[x] for x in names]
self.hasBStream=False
def connect_name(self, name):
index = names.index(name)
@ -30,7 +31,12 @@ class SpectralAnalysis:
self.channel = self.channels[ich]
print('Connecting to BS-Channel:',self.channel)
self.bs.channels.clear()
self.bs.get_vars(self.channel) # this starts the stream into the cache
self.hasBStream=True
try:
self.bs.get_vars(self.channel) # this starts the stream into the cache
except ValueError:
print('Cannot find requested channels in BS stream')
self.hasBStream=False
self.pv = PV(self.channel[0].replace('_Y','_X'))
def terminate(self):