示例#1
0
def checkbeam4scan():
    from gda.jython.commands.ScannableCommands import add_default, remove_default
    try:
        remove_default(checkbeamcv)
    except:
        pass
    add_default(checkbeam)
示例#2
0
    def __init__(self,rowScannable,columnScannable,andor,vortex):
        RasterScan.__init__(self)
        self.map_size = 50 # default
        self.rowScannable = rowScannable
        self.columnScannable = columnScannable
        self.andor = andor
        self.vortex = vortex
        self.setROI1(0.25, 0.35)
        self.setROI2(0.37, 0.42)
        self.setROI3(0.45, 0.57)
        self.setROI4(0.65, 0.75)
        self.setROI5(0, 0)
        self.setROI6(0, 0)
        self.setROI7(0, 0)
        self.setROI8(0, 0)
        self.plotterList = [Plotter("roi1_plotter",'roi1_total',"ROI1")]
        self.plotterList.append(Plotter("roi2_plotter",'roi2_total',"ROI2"))
        self.plotterList.append(Plotter("roi3_plotter",'roi3_total',"ROI3"))
        self.plotterList.append(Plotter("roi4_plotter",'roi4_total',"ROI4"))
        self.plotterList.append(Plotter("roi5_plotter",'roi5_total',"ROI5"))
        self.plotterList.append(Plotter("roi6_plotter",'roi6_total',"ROI6"))
        self.plotterList.append(Plotter("roi7_plotter",'roi7_total',"ROI7"))
        self.plotterList.append(Plotter("roi8_plotter",'roi8_total',"ROI8"))
        self.collectionTime =0.1
        #default for the mode trigger is EXTERNAL_EXPOSURE
        if self.andor != None: 
            self.andor.getCollectionStrategy().setTriggerMode(AndorTriggerMode.EXTERNAL_EXPOSURE)
        self.vortex.getCollectionStrategy().getXmap().getCollectionMode().setPixelsPerBuffer(1)
        self.isTriggerModeExternal = False
        self.pixelsPerBuffer = 1
        self.plotRate = 0

        for plotter in self.plotterList:
            add_default(plotter.getPlotter())
示例#3
0
def setDefaultScannables(new):
    # TODO: Replace this lot with a call to create a Scan with no defaults.
    from gda.jython.commands.ScannableCommands import get_defaults, add_default, remove_default
    original = get_defaults()
    for scn in original:
        remove_default(scn)
    for scn in new:
        add_default(scn)
    return original
示例#4
0
 def update(self, scan_object):
     self.logger.info("update(%r)" % scan_object)
     # restore default scannables after cvscan completed.
     if self.original_default_scannables is not None:
         from gda.jython.commands.ScannableCommands import add_default
         self.logger.debug("add original default scannables %r to default" %
                           self.original_default_scannables)
         for scn in self.original_default_scannables:
             add_default(scn)
     else:
         self.logger.debug("original default scannables is empty!")
示例#5
0
 def update(self, scanObject):
     self.logger.info("update(%r)" % scanObject)
     # restore default scannables after cvscan completed.
     if self.original_default_scannables is not None:
         from gda.jython.commands.ScannableCommands import add_default
         self.logger.debug("add original default scannables %r to default" %
                           self.original_default_scannables)
         for scn in self.original_default_scannables:
             add_default(scn)
     else:
         self.logger.debug("original default scannables is empty!")
     # put back hardware trigger provider for each waveform scannable after cvsacn
     if self.energy.getName() == "egy_g" or self.energy.getName(
     ) == "egy":  #support original ID follower implementation
         for each in self.wfs:
             each.setHardwareTriggerProvider(
                 self.energy_controller[each]
             )  # switch to ContinuousPgmGratingIDGapEnergyMoveController @UndefinedVariable
示例#6
0
def d12Gd():
    print "Move completed"
    d12posn.moveTo("Gd")  # @UndefinedVariable


from gda.jython.commands.GeneralCommands import alias
alias("d12Out")
alias("d12Ti")
alias("d12Co")
alias("d12Fe")
alias("d12Ni")
alias("d12Gd")

fileHeader.add([iamp12_gain])  # @UndefinedVariable
from gda.jython.commands.ScannableCommands import add_default
add_default([fileHeader])

print "Switch off scan processor by default at Sarnjeet's request on 11 May 2016 in I06-1."
print " To manually switch on scan processor, run 'scan_processing_on()' function on Jython Terminal."
print " To manually switch off scan processor, run 'scan_processing_off()' function on Jython Terminal."

from gdascripts.scan.installStandardScansWithProcessing import *  # @UnusedWildImport
scan_processor.rootNamespaceDict = globals()
import gdascripts
gdascripts.scan.concurrentScanWrapper.ROOT_NAMESPACE_DICT = globals(
)  # @UndefinedVariable
scan_processor_normal_processes = scan_processor.processors
scan_processor_empty_processes = []


def scan_processing_on():