25 lines
845 B
Python
25 lines
845 B
Python
import re
|
|
import sys
|
|
from typing import is_typeddict
|
|
|
|
|
|
from sfbd.interface import getSnapPV,getSnapVal
|
|
|
|
from epics import PV
|
|
|
|
class Machine:
|
|
def __init__(self):
|
|
print('Initializing PVs for Snapshot...')
|
|
mags = ['SINLH02-MBND100', 'SINBC02-MBND100', 'S10BC02-MBND100', 'SARCL02-MBND100', 'SATCL01-MBND100',
|
|
'SATUN05-MBND100']
|
|
self.snapPVs = getSnapPV() + [PV('%s:ENERGY-OP' % ele, auto_monitor=False) for ele in mags]
|
|
self.omfilter = ['.*-RMSM:SM-SET','.*-RSYS:REQUIRED-OP','.*-RSYS:SET-ACC-VOLT','.*-RSYS:SET-BEAM-PHASE']
|
|
|
|
|
|
|
|
def getSnap(self,filters = ['.*']):
|
|
if isinstance(filters, str):
|
|
filters = [filters]
|
|
recomp = re.compile('|'.join(filters))
|
|
# pvget = [pv for pv in self.snapPVs if recomp.match(pv.pvname)]
|
|
# self.snap = getSnapVal(pvget) |