当前位置: 首页>>代码示例>>Python>>正文


Python CAClient.cagetArrayDouble方法代码示例

本文整理汇总了Python中gda.epics.CAClient.cagetArrayDouble方法的典型用法代码示例。如果您正苦于以下问题:Python CAClient.cagetArrayDouble方法的具体用法?Python CAClient.cagetArrayDouble怎么用?Python CAClient.cagetArrayDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gda.epics.CAClient的用法示例。


在下文中一共展示了CAClient.cagetArrayDouble方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ADCChannel

# 需要导入模块: from gda.epics import CAClient [as 别名]
# 或者: from gda.epics.CAClient import cagetArrayDouble [as 别名]
class ADCChannel(ScannableMotionBase, MonitorListener):
    
    def __init__(self, name, pv):
        self.setName(name)
        self.setInputNames([])
        self.pvcli=CAClient(pv)
        self.nordcli=CAClient(pv+".NORD")
        self.monitoradded=False
        self.counter=0
        self.numberofgates=0
        self.numberofframes=0
        self.filename=None
        self.filenames=[]
        self.collectionNumber=0 #0 means no collectionNumber
        self.voltagesmonitor=None
        self.firstMonitor = True
        self.voltages = {}
        
    def resetCounter(self):
        self.counter=0
        
    def resetRepetition(self):
        self.collectionNumber=0
        
    def setCollectionNumber(self, num):
        self.collectionNumber=num
        
    def setNumberOfGates(self, num):
        self.numberofgates=num
        
    def setNumberOfFrames(self, num):
        self.numberofframes=num
        
    def getNumberOfGates(self):
        return self.numberofgates
    
    def getNumberOfFrames(self):
        return self.numberofframes
    
    def setFilename(self, filename):
        self.filename=filename
        
    def getFilename(self):
        return self.filename
    
    def getFilenames(self):
        return self.filenames
    
    def getValues(self):
        try:
            if not self.pvcli.isConfigured():
                self.pvcli.configure()
            return self.pvcli.cagetArrayDouble()
        except FactoryException, e:
            print "create channel error (%s): %s" % (self.pvcli.getChannel().getName(),e)
        except CAException, e:
            print "caput Error (%s): %s" % (self.pvcli.getChannel().getName(),e)
开发者ID:fajinyuan,项目名称:gda-dls-beamline-i11,代码行数:59,代码来源:adcchannel.py

示例2: DataCapturer

# 需要导入模块: from gda.epics import CAClient [as 别名]
# 或者: from gda.epics.CAClient import cagetArrayDouble [as 别名]
class DataCapturer(ScannableMotionBase, MonitorListener):
    
    def __init__(self, name, adc, hv=adcppv, el=adcepv, gate=adcgatepv): 
        self.setName(name)
        self.setInputNames(["HV","Electrometer","gate"])
        self.hv=hv
        self.el=el
        self.gate=gate
        self.voltagecli=CAClient(hv)
        self.electrometercli=CAClient(el)
        self.gatecli=CAClient(gate)
        self.monitoradded=False
        self.filename=None
        self.voltagemonitor=None
        self.electrometermonitor=None
        self.gatemonitor=None
        self.firstMonitor = True
        self.data={hv:[],el:[],gate:[]}
        self.voltages = []      # for holding voltage data array
        self.electrometers=[]   # for holding electrometer data array
        self.gates=[]
        self.firstData = True
        self.updatecounter=0
        self.capturecounter=0
        self.adc=adc
    
    def reset(self):
        self.electrometers = []
        self.voltages = []
        self.gates=[]
        self.updatecounter=0
        self.capturecounter=0
        self.firstData = True
        self.adc.disable()
        self.data={self.hv:[],self.el:[],self.gate:[]}
        
    def setFilename(self, filename):
        self.filename=filename
        
    def getFilename(self):
        return self.filename
    
    def getElectrometer(self, num):
        ''' retrieve electrometer data from Keithley amplifier.
        '''
        try:
            if not self.electrometercli.isConfigured():
                self.electrometercli.configure()
            return self.electrometercli.cagetArrayDouble(num)
        except FactoryException, e:
            print "create channel error (%s): %s" % (self.electrometercli.getChannel().getName(),e)
        except CAException, e:
            print "caget Error (%s): %s" % (self.electrometercli.getChannel().getName(),e)
开发者ID:fajinyuan,项目名称:gda-dls-beamline-i11,代码行数:55,代码来源:pedatacapturer_continuous.py

示例3: ADC

# 需要导入模块: from gda.epics import CAClient [as 别名]
# 或者: from gda.epics.CAClient import cagetArrayDouble [as 别名]
class ADC(ScannableMotionBase, MonitorListener):
    
    def __init__(self, name, hv=adcppv, el=adcepv, gate=adcgatepv):
        self.setName(name)
        self.setInputNames([])
        self.hv=hv
        self.el=el
        self.gate=gate
        self.voltagecli=CAClient(hv)
        self.electrometercli=CAClient(el)
        self.gatecli=CAClient(gate)
        self.voltagenordcli=CAClient(hv+".NORD")
        self.electrometernordcli=CAClient(el+".NORD")
        self.monitoradded=False
        self.filename=None
        self.voltagemonitor=None
        self.electrometermonitor=None
        self.gatemonitor=None
        self.firstMonitor = True
        self.data={hv:[],el:[],gate:[]}
        self.voltages = []      # for holding voltage data array
        self.electrometers=[]   # for holding electrometer data array
        self.gates=[]
        self.firstData = True
        self.fastmode = False
        self.numberofgate=0
        self.fastMode=True
        self.updatecounter=0
        self.collectionNumber=1
               
    def setNumberOfGates(self, ng):
        self.numberofgate=ng
        
    def getNumberOfGates(self):
        return self.numberofgate
    
    def getCollectionNumber(self):
        return self.collectionNumber
    
    def setCollectionNumber(self, num):
        self.collectionNumber=num
    
    def isFastMode(self):
        return self.fastMode
    
    def setFastMode(self, mode):
        self.fastMode=mode
        
    def reset(self):
        self.electrometers = []
        self.voltages = []
        self.updatecounter=0
        self.collectionNumber=1
        
    def setFilename(self, filename):
        self.filename=filename
        
    def getFilename(self):
        return self.filename
    
    def getElectrometer(self, num):
        try:
            if not self.electrometercli.isConfigured():
                self.electrometercli.configure()
            return self.electrometercli.cagetArrayDouble(num)
        except FactoryException, e:
            print "create channel error (%s): %s" % (self.electrometercli.getChannel().getName(),e)
        except CAException, e:
            print "caget Error (%s): %s" % (self.electrometercli.getChannel().getName(),e)
开发者ID:fajinyuan,项目名称:gda-dls-beamline-i11,代码行数:71,代码来源:adc.py

示例4: cagetArray

# 需要导入模块: from gda.epics import CAClient [as 别名]
# 或者: from gda.epics.CAClient import cagetArrayDouble [as 别名]
def cagetArray(pvstring):
	cli=CAClient(pvstring)
	cli.configure()
	out=cli.cagetArrayDouble()
	cli.clearup()
	return out
开发者ID:openGDA,项目名称:gda-core,代码行数:8,代码来源:utils.py


注:本文中的gda.epics.CAClient.cagetArrayDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。