示例#1
0
def zacscan(startEnergy, endEnergy, scanTime, pointTime):
    try:
        uuu.backupDefaults()
        if beamline_name == "i06-1":
            #TODO ask Sarnjeet for an update
            uuu.removeDefaults(
                ['ca61sr', 'ca62sr', 'ca63sr', 'ca64sr', 'ca65sr', 'ca66sr'])

        if beamline_name == "i06":
            if not ROI_DEFINED_IN_GUI:
                if not roi1 or not roi2 or not roi3 or not roi4:  # @UndefinedVariable
                    raise Exception("4 ROIs are required.")
                #setup ROIs
                fesController.setupAreaDetectorROIs([roi1, roi2, roi3, roi4
                                                     ])  # @UndefinedVariable
        beamlineutil.stopArchiving()
        fastEnergy.cvscan(startEnergy, endEnergy, scanTime, pointTime)
        beamlineutil.registerFileForArchiving(beamlineutil.getLastScanFile())
        beamlineutil.restoreArchiving()

        uuu.restoreDefaults()

    except:
        errortype, exception, traceback = sys.exc_info()
        logger.fullLog(None, "Error in zacscan", errortype, exception,
                       traceback, False)
示例#2
0
def zacstop():
    try:
        fastEnergy.stop()
        beamlineutil.restoreArchiving()
        InterfaceProvider.getCommandAborter().abortCommands()
    except:
        errortype, exception, traceback = sys.exc_info()
        logger.fullLog(None, "Error in stopping the zacscan ", errortype,
                       exception, traceback, False)
示例#3
0
def m6qgscan(q0):
    #	scan m6qg q0-200 q0+200 20 ca62sr 0.5
    try:
        theScan = PointsScan([m6qg, q0 - 200, q0 + 200, 20, ca62sr, 0.5])
        theScan.runScan()
    except:
        exceptionType, exception, traceback = sys.exc_info()
        logger.fullLog(None, "Error occurs when try to scan m6qg",
                       exceptionType, exception, traceback, True)


#	To load up data with axis name as dictionary key
    data = dnp.io.load(lastscan(), formats=['srs'], asdict=True)
    return data
示例#4
0
def zacscan(startEnergy, endEnergy, scanTime, pointTime):
    try:
        uuu.backupDefaults()
        uuu.removeDefaults(
            ['ca61sr', 'ca62sr', 'ca63sr', 'ca64sr', 'ca65sr', 'ca66sr'])

        beamlineutil.stopArchiving()
        fastEnergy.cvscan(startEnergy, endEnergy, scanTime, pointTime)
        beamlineutil.registerFileForArchiving(beamlineutil.getLastScanFile())
        beamlineutil.restoreArchiving()

        uuu.restoreDefaults()

    except:
        errortype, exception, traceback = sys.exc_info()
        logger.fullLog(None, "Error in zacscan", errortype, exception,
                       traceback, False)