Ejemplo n.º 1
0
# Define as PV objects.  Example PV('MY:RANDOM:PV')
#lsrpwrPv=PV('ESB:A01:ADC1:AI:CH3')
#toroid0355Pv=PV('ESB:A01:ADC1:AI:CH4')
#toroid2150Pv=PV('ESB:A01:ADC1:AI:CH5')
#structureChargePv=PV('ESB:A01:ADC1:CALC:CH1:CONV')

# --- Image grabbing --------------------------
# Override saved camera settings here. Leave empty list to use the default; otherwise add PVs with single quotes.
grabImagesSettingsPvList = []
#
# Create ImageGrabber object.
# First arg (required) is the camera PV prefix, leave as empty string to get from pvScan IOC.
# Second arg (optional) is the number of images.
# Second arg (optional) is a list of camera setting PVs to be dumped to a file.
# Third arg (optional [TIFF1]) is the image grabbing plugin.
grab1 = pvscan.ImageGrabber('13PS7', 3)  # Sample camera
grab2 = pvscan.ImageGrabber('')  # Get camera from PV
#-------------------------------------------------------------

#--- Experiment specifics ------------------------------------------
LedPv = PV('ESB:GP01:VAL04')  # PV for sample LED
beamRate = PV(
    pvPrefix +
    ':BEAMRATE').get()  # Beam rate input parameter; for timing image grabbing
nImages = grab2.nImages  # N images for sample camera
grabSampleImagesFlag = PV(pvPrefix + ':GRABIMAGES:SAMPLE').get()
ssBeamFlag = PV(pvPrefix + ':SCAN:SSBEAM').get()  # Single-shot beam flag
ssBeamPumpFlag = PV(pvPrefix +
                    ':SCAN:SSBEAMPUMP').get()  # Single-shot beam/pump flag
waitTime = nImages / beamRate
grab1.fileNamePrefix = exp1.targetname  # Add target name to image file prefix
Ejemplo n.º 2
0
dataLogPvList=shutterGroup1.rbv + [motor1.rbv,motor2.rbv,motor3.rbv,motor4.rbv,motor5.rbv]
#
# Create DataLogger object.
# Argument is the list of PVs to monitor.
dataLog1=pvscan.DataLogger(dataLogPvList)
#-------------------------------------------------

# --- Image grabbing --------------------------
# Override saved camera settings here. Leave empty list to use the default; otherwise add PVs with single quotes.
grabImagesSettingsPvList=[]
#
# Create ImageGrabber object.
# First arg is the camera PV prefix.
# Second arg (optional) is a list of camera setting PVs to be dumped to a file.
# Third arg (optional) is the image grabbing plugin.
grab0=pvscan.ImageGrabber('13PS7')
grab1=pvscan.ImageGrabber('13PS10')
#-------------------------------------------------------------

# --- For UED  --------------------------
resetFlag=PV(pvPrefix + ':RESET:ENABLE').get()
radius=PV(pvPrefix + ':RADIUS').get()
resetMotorPv=motor1
nResets=PV(pvPrefix + ':NRESETS').get()
#-------------------------------------------------------------

### Define scan routine #####################################################

def resetLoop(grabObject='',resetMotorPv=''):
    "Does UED DAE reset routine."
    pvscan.printMsg('Starting reset loop')
Ejemplo n.º 3
0
start = time()
dataLog1 = pvscan.DataLogger(dataLogPvList)
end = time()
print 'dataLog: ', end - start
#-------------------------------------------------

# --- Image grabbing --------------------------
# Override saved camera settings here. Leave empty list to use the default; otherwise add PVs with single quotes.
grabImagesSettingsPvList = []
#
# Create ImageGrabber object.
# First arg is the camera PV prefix, leave as empty string to get from pvScan IOC.
# Second arg (optional) is a list of camera setting PVs to be dumped to a file.
# Third arg (optional) is the image grabbing plugin.
start = time()
grab1 = pvscan.ImageGrabber('')
end = time()
print 'grab: ', end - start
#-------------------------------------------------------------

### Define scan routine #####################################################


def scanRoutine():
    "This is the scan routine"
    pvscan.printMsg('Starting')
    sleep(0.5)  # Collect some initial data first
    # Open all shutters, but only if enabled from PV.
    if shutter1.enabled:
        pvscan.printMsg('Opening drive shutter')
        shutter1.open.put(1)
Ejemplo n.º 4
0
dataLogPvList = shutterGroup1.rbv + [scanPv1]
#
# Create DataLogger object.
# Argument is the list of PVs to monitor.
dataLog1 = pvscan.DataLogger(dataLogPvList)
#-------------------------------------------------

# --- Image grabbing --------------------------
# Override saved camera settings here. Leave empty list to use the default; otherwise add PVs with single quotes.
grabImagesSettingsPvList = []
#
# Create ImageGrabber object.
# First arg is the camera PV prefix.
# Second arg (optional) is a list of camera setting PVs to be dumped to a file.
# Third arg (optional) is the image grabbing plugin.
grab1 = pvscan.ImageGrabber('ANDOR1')
#-------------------------------------------------------------

### Define scan routine #####################################################


def scanRoutine():
    "This is the scan routine"
    pvscan.printMsg('Starting')
    sleep(0.5)  # Collect some initial data first
    # Open all shutters, but only if enabled from PV.
    if shutter1.enabled:
        pvscan.printMsg('Opening drive shutter')
        shutter1.open.put(1)
    if shutter2.enabled:
        pvscan.printMsg('Opening pump shutter')
Ejemplo n.º 5
0
# Define as PV objects.  Example PV('MY:RANDOM:PV')
#lsrpwrPv=PV('ESB:A01:ADC1:AI:CH3')
#toroid0355Pv=PV('ESB:A01:ADC1:AI:CH4')
#toroid2150Pv=PV('ESB:A01:ADC1:AI:CH5')
#structureChargePv=PV('ESB:A01:ADC1:CALC:CH1:CONV')

# --- Image grabbing --------------------------
# Override saved camera settings here. Leave empty list to use the default; otherwise add PVs with single quotes.
grabImagesSettingsPvList=[]
#
# Create ImageGrabber object.
# 1st arg (required) is the camera PV prefix, leave as empty string to get from pvScan IOC.  
# 2nd arg (optional) is the number of images.
# 3rd arg (optional) is a list of camera setting PVs to be dumped to a file.
# 4th arg (optional [TIFF1]) is the image grabbing plugin.
grab1=pvscan.ImageGrabber('ASPS03',3)  # Sample camera
grab2=pvscan.ImageGrabber('')  # Get camera from PV
#-------------------------------------------------------------

# --- Experiment specifics  --------------------------
radius=PV(pvPrefix + ':RADIUS').get()
resetMotorPv=motor1
nResets=PV(pvPrefix + ':NRESETS').get()
radius2=PV(pvPrefix + ':RADIUS2').get()
#-------------------------------------------------------------

#---- Data logging --------------------------
# List of PV() objects to be monitored during scan.  
# Example: dataLogPvList=shutterGroup1.rbv + [motor1.rbv,lsrpwrPv,PV('MY:PV1')] + [PV('MY:PV2')]
dataLogPvList=[grab2.timestampRBVPv,grab2.captureRBVPv] + shutterGroup1.rbv + [motor1.rbv,motor2.rbv,motor3.rbv,motor4.rbv,motor5.rbv]
#