def __init__(self, prefix, nmca=4, filesaver='HDF1:', fileroot='/home/xspress3/cars5/Data'): if not prefix.endswith(':'): prefix = "%s:" % prefix self.nmca = nmca attrs = [] attrs.extend(['%s%s' % (filesaver,p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self.mcas = [] for i in range(nmca): imca = i+1 dprefix = "%sdet1:" % prefix rprefix = "%sMCA%iROI" % (prefix, imca) data_pv = "%sMCA%i:ArrayData" % (prefix, imca) mca = ADMCA(dprefix, data_pv=data_pv, roi_prefix=rprefix) self.mcas.append(mca) Device.__init__(self, prefix, attrs=attrs, delim='') for attr in self.det_attrs: self.add_pv("%sdet1:%s" % (prefix, attr), attr) for i in range(nmca): imca = i+1 for j in range(8): isca = j+1 attr="C%iSCA%i"% (imca, isca) self.add_pv("%s%s:Value_RBV" % (prefix, attr), attr) for attr in ('TSNumPoints', 'TSControl'): self.add_pv("%sMCA%iROI:%s" % (prefix, imca, attr), "MCA%i%s" % (imca, attr)) self.add_pv("%sC%iSCA:%s" % (prefix, imca, attr), "SCA%i%s" % (imca, attr)) time.sleep(0.05)
def __init__(self, prefix, nmcas=4, filesaver='HDF1:', fileroot='/T/xas_user'): dt = debugtime() if not prefix.endswith(':'): prefix = "%s:" % prefix self.nmcas = nmcas attrs = [] attrs.extend(['%s%s' % (filesaver, p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self.mcas = [] for i in range(nmcas): imca = i+1 dprefix = "%sdet1:" % prefix rprefix = "%sMCA%iROI" % (prefix, imca) data_pv = "%sMCA%i:ArrayData" % (prefix, imca) mca = ADMCA(dprefix, data_pv=data_pv, roi_prefix=rprefix) self.mcas.append(mca) attrs.append("%s:MCA%iROI:TSControl" % (prefix, imca)) attrs.append("%s:MCA%iROI:TSNumPoints" % (prefix, imca)) attrs.append("%s:C%iSCA:TSControl" % (prefix, imca)) attrs.append("%s:C%iSCA:TSNumPoints" % (prefix, imca)) Device.__init__(self, prefix, attrs=attrs, delim='') for attr in self.det_attrs: self.add_pv("%sdet1:%s" % (prefix, attr), attr) for i in range(nmcas): imca = i+1 for j in range(8): isca = j+1 attr = "C%iSCA%i"% (imca, isca) self.add_pv("%s%s:Value_RBV" % (prefix, attr), attr) poll(0.003, 0.25)
def __init__(self, prefix, nchan=4, sis_prefix=None): self._mode = SCALER_MODE self.ROIMode = self.NDArrayMode self._chans = range(1, nchan + 1) attrs = list(self.attrs) for i in self._chans: for a in self.curr_attrs: attrs.append(("Current" + a) % i) Device.__init__(self, prefix, delim='', attrs=attrs, mutable=False) self._aliases = {} for i in self._chans: self._aliases['Current%i' % i] = 'Current%i:MeanValue_RBV' % i self._aliases['Sigma%i' % i] = 'Current%i:Sigma_RBV' % i self._aliases['Offset%i' % i] = 'CurrentOffset%i' % i self._aliases['Scale%i' % i] = 'CurrentScale%i' % i self._aliases['Name%i' % i] = 'CurrentName%i' % i self._aliases['TSControl%i' % i] = 'Current%i:TSControl' % i self._aliases['TSAcquiring%i' % i] = 'Current%i:TSAcquiring' % i self._aliases['TSNumPoints%i' % i] = 'Current%i:TSNumPoints' % i self._aliases['TSTotal%i' % i] = 'Current%i:TSTotal' % i self._aliases['TSSigma%i' % i] = 'Current%i:TSSigma' % i self._sis = None if sis_prefix is not None: self.sis_prefix = sis_prefix self._sis = Struck(prefix)
def __init__(self, prefix, filesaver='TIFF1:', fileroot='T:/xas_user'): attrs = ['%s%s' % (filesaver, p) for p in AD_FILE_ATTRS] Device.__init__(self, prefix, delim='', mutable=False, attrs=attrs) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix
def __init__(self, prefix, nchan=4, sis_prefix=None): if not prefix.endswith(':'): prefix = "%s:" % prefix self._mode = SCALER_MODE self.ROIMode = self.NDArrayMode self._chans = range(1, nchan+1) attrs = list(self.attrs) for i in self._chans: for a in self.curr_attrs: attrs.append(("Current" + a) % i) Device.__init__(self, prefix, delim='', attrs=attrs, mutable=False) self._aliases = {} for i in self._chans: self._aliases['Current%i'% i] = 'Current%i:MeanValue_RBV' % i self._aliases['Sigma%i'% i] = 'Current%i:Sigma_RBV' % i self._aliases['Offset%i'% i] = 'CurrentOffset%i' % i self._aliases['Scale%i'% i] = 'CurrentScale%i' % i self._aliases['Name%i'% i] = 'CurrentName%i' % i self._aliases['TSControl%i'% i] = 'Current%i:TSControl' % i self._aliases['TSAcquiring%i'% i] = 'Current%i:TSAcquiring' % i self._aliases['TSNumPoints%i'% i] = 'Current%i:TSNumPoints' % i self._aliases['TSTotal%i'% i] = 'Current%i:TSTotal' % i self._aliases['TSSigma%i'% i] = 'Current%i:TSSigma' % i self._sis = None if sis_prefix is not None: self.sis_prefix = sis_prefix self._sis = Struck(prefix)
def __init__(self, prefix, scaler=None, nchan=8, clockrate=50.0): self._nchan = nchan self.scaler = None self.clockrate = clockrate # clock rate in MHz self._mode = SCALER_MODE if scaler is not None: self.scaler = Scaler(scaler, nchan=nchan) self.mcas = [] for i in range(nchan): self.mcas.append(MCA(prefix, mca=i + 1, nrois=2)) Device.__init__(self, prefix, delim='', attrs=self.attrs, mutable=False) time.sleep(0.05) for pvname, pv in self._pvs.items(): pv.get() self.ast_interp = asteval.Interpreter() self.read_scaler_config()
def __init__(self, prefix, nmcas=4, filesaver='HDF1:', fileroot='/home/xspress3'): dt = debugtime() self.nmcas = nmcas attrs = [] attrs.extend(['%s%s' % (filesaver, p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self.mcas = [] for i in range(nmcas): imca = i + 1 dprefix = "%sdet1:" % prefix rprefix = "%sMCA%iROI" % (prefix, imca) data_pv = "%sMCA%i:ArrayData" % (prefix, imca) mca = ADMCA(dprefix, data_pv=data_pv, roi_prefix=rprefix) self.mcas.append(mca) attrs.append("MCA%iROI:TSControl" % (imca)) attrs.append("MCA%iROI:TSNumPoints" % (imca)) attrs.append("C%iSCA:TSControl" % (imca)) attrs.append("C%iSCA:TSNumPoints" % (imca)) Device.__init__(self, prefix, attrs=attrs, delim='') for attr in self.det_attrs: self.add_pv("%sdet1:%s" % (prefix, attr), attr) for i in range(nmcas): imca = i + 1 for j in range(8): isca = j + 1 attr = "C%iSCA%i" % (imca, isca) self.add_pv("%s%s:Value_RBV" % (prefix, attr), attr) poll(0.003, 0.25)
def __init__(self, prefix, roi=1, bgr_width=3, data_pv=None, with_poll=False): self._prefix = '%s:%i' % (prefix, roi) Device.__init__(self, self._prefix, delim=':', attrs=('Name', 'MinX'), with_poll=with_poll) self._aliases = {'left': 'MinX', 'width': 'SizeX', 'name': 'Name', 'sum': 'Total_RBV', 'net': 'Net_RBV'} self.data_pv = data_pv
def __init__(self, prefix, nmca=4, filesaver='HDF5:', fileroot='/home/xspress3/cars5/Data'): self.nmca = nmca attrs = list(self.attrs) attrs.extend(['%s%s' % (filesaver,p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix Device.__init__(self, prefix, attrs=attrs, delim='') time.sleep(0.1)
def __init__(self, prefix, nmca=4, filesaver="HDF5:", fileroot="/home/xspress3/cars5/Data"): self.nmca = nmca attrs = list(self.attrs) attrs.extend(["%s%s" % (filesaver, p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self._save_rois = [] self.mcas = [MCA(prefix, mca=i + 1) for i in range(nmca)] Device.__init__(self, prefix, attrs=attrs, delim="") time.sleep(0.1)
def __init__(self, prefix, nmca=4, filesaver='HDF5:', fileroot='/home/xspress3/cars5/Data'): self.nmca = nmca attrs = list(self.attrs) attrs.extend(['%s%s' % (filesaver,p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self._save_rois = [] self.mcas = [MCA(prefix, mca=i+1) for i in range(nmca)] Device.__init__(self, prefix, attrs=attrs, delim='') time.sleep(0.1)
def __init__(self, prefix, filesaver='netCDF1:',nmca=4, fileroot='/home'): self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self.nmca = nmca self.dxps = [DXP(prefix, mca=i+1) for i in range(nmca)] self.mcas = [MCA(prefix, mca=i+1) for i in range(nmca)] Device.__init__(self, prefix, attrs=self.attrs, delim='', mutable=True) for p in self.pathattrs: pvname = '%s%s%s' % (prefix, filesaver, p) self.add_pv(pvname, attr=p)
def __init__(self, prefix, data_pv=None, nrois=None, roi_prefix=None): self._prefix = prefix Device.__init__(self, self._prefix, delim='', attrs=self._attrs, with_poll=False) if data_pv is not None: self._pvs['VAL'] = PV(data_pv) self._npts = None self._nrois = nrois if self._nrois is None: self._nrois = MAX_ROIS self._roi_prefix = roi_prefix for i in range(self._nrois): p = get_pv('%s:%i:Name' % (self._roi_prefix, i+1)) p = get_pv('%s:%i:MinX' % (self._roi_prefix, i+1)) p = get_pv('%s:%i:SizeX' % (self._roi_prefix, i+1)) self.get_rois() poll()
def __init__(self, prefix, scaler=None, nchan=8, clockrate=50.0): if not prefix.endswith(':'): prefix = "%s:" % prefix self._nchan = nchan self.scaler = None self.clockrate = clockrate # clock rate in MHz self._mode = SCALER_MODE if scaler is not None: self.scaler = Scaler(scaler, nchan=nchan) self.mcas = [] for i in range(nchan): self.mcas.append(MCA(prefix, mca=i+1, nrois=2)) Device.__init__(self, prefix, delim='', attrs=self.attrs, mutable=False) time.sleep(0.05) for pvname, pv in self._pvs.items(): pv.get()
def __init__(self, prefix, scaler=None, nchan=8, clockrate=50.0): self._nchan = nchan self.scaler = None self.clockrate = clockrate # clock rate in MHz self._mode = SCALER_MODE if scaler is not None: self.scaler = Scaler(scaler, nchan=nchan) self.mcas = [] for i in range(nchan): self.mcas.append(MCA(prefix, mca=i+1, nrois=2)) Device.__init__(self, prefix, delim='', attrs=self.attrs, mutable=False) time.sleep(0.05) for pvname, pv in self._pvs.items(): pv.get() self.ast_interp = asteval.Interpreter() self.read_scaler_config()
def __init__(self, prefix, nmca=4, filesaver="HDF1:", fileroot="/home/xspress3/cars5/Data"): if not prefix.endswith(":"): prefix = "%s:" % prefix self.nmca = nmca attrs = [] attrs.extend(["%s%s" % (filesaver, p) for p in self.pathattrs]) self.filesaver = filesaver self.fileroot = fileroot self._prefix = prefix self._save_rois = [] self.mcas = [] for i in range(nmca): imca = i + 1 dprefix = "%sdet1" % prefix rprefix = "%sMCA%iROI" % (prefix, imca) data_pv = "%sMCA%i:ArrayData" % (prefix, imca) mca = ADMCA(dprefix, data_pv=data_pv, roi_prefix=rprefix) self.mcas.append(mca) Device.__init__(self, prefix, attrs=attrs, delim="") for attr in self.det_attrs: self.add_pv("%sdet1:%s" % (prefix, attr), attr) time.sleep(0.1)
def __init__(self, prefix='13XRM:ION:'): Device.__init__(self, prefix, attrs=self.attrs)
def __init__(self, prefix, cam="cam1:"): Device.__init__(self, '%s%s' % (prefix, cam), delim='', attrs=AD_CAM_ATTRS)
def __init__(self, prefix, roistat="ROIStat1:"): Device.__init__(self, '%s%s' % (prefix, roistat), delim='', attrs=AD_ROISTAT_ATTRS)
def __init__(self, prefix='XF:04BM-ES:1:ION:'): Device.__init__(self, prefix, attrs=self.attrs)