コード例 #1
0
 def __init__(self,
              name,
              idgap,
              dcmenergy,
              lut,
              gap_offset=None,
              feedbackPVs=None):
     """
     Constructor - Only succeeds if it finds the lookup table,
     otherwise raises exception.
     """
     self.lut = readLookupTable(
         LocalProperties.get("gda.config") + "/lookupTables/" + lut)
     self.gap = idgap
     self.mono_energy = dcmenergy
     self.lambdau = 27  # undulator period
     self.scannables = ScannableGroup(name, [dcmenergy, idgap])
     self.detune = gap_offset
     self.feedbackPVs = feedbackPVs
     self._busy = 0
     self.setName(name)
     self.setLevel(3)
     self.setOutputFormat(["%10.6f"])
     self.inputNames = [name]
     self.order = 3
     self.SCANNING = False
     self.logger = logger.getChild(self.__class__.__name__)
コード例 #2
0
def dataCollection(samples=[]):
    lookuptable=readLookupTable(LocalProperties.get("gda.function.lookupTable.dir")+os.path.sep+"lde_stages_home_positions.txt")
    
    for each in lookuptable.keys:
        stage=StageDataCollection(each)
        for sample in samples:
            if sample["cell_ID"].contains(each):
                stage.addSample(sample)
        stage.processSamples()
コード例 #3
0
 def __init__(self, stageName):
     self.name=stageName
     self.calibrant_file_name=None
     self.stage_x=Finder.getInstance().find(stageName+"x")
     self.stage_y=Finder.getInstance().find(stageName+"y")
     self.stage_rot=Finder.getInstance().find(stageName+"rot")
     self.lookup_table = readLookupTable(LocalProperties.get("gda.function.lookupTable.dir")+os.path.sep+"lde_stages_home_positions.txt")
     self.samples=[]
     self.calibration_required=True
     self.pixium=Finder.getInstance().find('pixium_hdf')
コード例 #4
0
 def __init__(self, name, lut):
     """
     Constructor - Only succeeds if it finds the lookup table,
     otherwise raises exception.
     """
     self.lut = readLookupTable(
         LocalProperties.get("gda.config") + "/lookupTables/" + lut)
     self.gap = "igap"
     self.dcm = "dcmenergy"
     self.lambdau = 27  # undulator period
     self.scannableNames = ["dcmenergy", "igap"]
     self.scannables = ScannableGroup(
         name, [Finder.find(x) for x in self.scannableNames])
     self._busy = 0
     self.setName(name)
     self.setLevel(3)
     self.setOutputFormat(["%10.6f"])
     self.inputNames = [name]
     self.order = 3
     self.logger = logger.getChild(self.__class__.__name__)
コード例 #5
0
 def __init__(self, name, idgap, pgmenergy, lut, gap_offset=None, feedbackPV=None):
     """
     Constructor -
     Only succeeds if it finds the lookup table, otherwise raises exception.
     """
     self.lut = readLookupTable(LocalProperties.get("gda.config") + "/lookupTables/" + lut)
     self.gap = idgap
     self.mono_energy = pgmenergy
     self.scannables = ScannableGroup(name, [pgmenergy, idgap])
     self.detune=gap_offset
     self.feedbackPV=feedbackPV
     self._busy = 0
     self.setName(name)
     self.setLevel(3)
     self.setOutputFormat(["%10.6f"])
     self.inputNames = [name]
     self.SCANNING=False
     self.order = 1
     self.polarisation = 'LH'
     self.jidphase = Finder.find("jidphase")
     self.logger = logger.getChild(self.__class__.__name__)
コード例 #6
0
 def __init__(self, name, gap="jgap", dcm="pgmenergy", undulatorperiod=27, lut="JIDCalibrationTable.txt"):
     '''Constructor - Only succeed if it find the lookup table, otherwise raise exception.'''
     self.lut=readLookupTable(LocalProperties.get("gda.config")+"/lookupTables/"+lut)
     self.gap=gap
     self.dcm=dcm
     self.lambdau=undulatorperiod
     if dcm is None:
         self.scannableNames=[gap]
     else:
         self.scannableNames=[dcm,gap]
     self.scannables=ScannableGroup(name, [Finder.find(x) for x in self.scannableNames])
     self._busy=0
     self.setName(name)
     self.setLevel(3)
     self.setOutputFormat(["%10.6f"])
     self.inputNames=[name]
     if self.dcm == "dcmenergy":
         self.order=3
     else:
         self.order=1
     self.energy=self.scannables.getGroupMember(self.scannableNames[0]).getPosition()
     self.polarisation='H'
コード例 #7
0
def parkingAllDevices():
    '''move all stages to parking positions'''
    lookuptable=readLookupTable(LocalProperties.get("gda.function.lookupTable.dir")+os.path.sep+"lde_stages_home_positions.txt")
    for each in lookuptable.keys:
        stage=StageDataCollection(each)
        stage.moveToSafePosition()