Files
sf-op/script/test/CompressionBug.py
root 7da4e32097
2018-06-04 11:02:16 +02:00

34 lines
943 B
Python

#import ch.psi.pshell.epics.ChannelDouble as ChannelDouble
import ch.psi.pshell.bs.Scalar as Scalar
import ch.psi.pshell.bs.Waveform as Waveform
#dispatcher.config.disableCompression = False
set_exec_pars(save = False)
#Arguments
SAMPLES = 5
BLMS = ["SINDI02-DBLM025", ] #"SINDI02-DBLM085", "S10DI01-DBLM045"]
sensors = []
st = Stream("pulse_id", dispatcher)
#st.setFilter("SIN-CVME-TIFGUN-EVR0:BEAMOK == 1")
for i in range(len(BLMS)):
blm = Scalar("blm" + str(i+1), st, BLMS[i] + ":B1_LOSS", 1, 0)
av = create_averager(blm, SAMPLES, interval = -1)
av.setMonitored(i>0)
sensors.append(av)
sensors.append(av.stdev)
sensors.append(av.samples)
bpmw = Waveform("blmw" + str(i+1), st, BLMS[i] + ":LOSS_SIGNAL_RAW", 1, 0)
sensors.append(bpmw)
st.initialize()
st.start()
if not st.waitCacheChange(3000): #Wait stream be running before starting scan
raise Exception("Stream timeout")
bscan(st, 10)