#! /usr/bin/env python
# Federica Marone, July 2, 2014

from epicsMotor import epicsMotor
from epicsPV import epicsPV

chScanType=epicsPV("X02DA-ES1-SCAN1:TYPE")
chSystemOffset=epicsPV("X02DA-SCAN-CAM1:SYSOFF")

# Machine
chRingCurrentStatus=epicsPV("ARIDI-PCT:CURRENT")
chRingCurrentStartFake=epicsPV("X02DA-SCAN-SCN1:CURR")
chRingCurrentStartFake.setMonitor()
chInterlockStatus=epicsPV("X02DA-FE-AB1:ILK-STATE")
chInterlockStatus.setMonitor()
chAbsorberStatus=epicsPV("X02DA-FE-AB1:CLOSE4BL")
chAbsorberStatus.setMonitor()

# Energy
chCrystal1Pitch=epicsMotor("X02DA-OP-MO1:C1THE")
chBeamEnergy=epicsPV("X02DA-OP-ENE:ACTUAL")
chStripe=epicsPV("X02DA-OP-MO1:ACT_STR")

# Filters
chFEFilter=epicsPV("X02DA-FE-FI1:READ")
chOPFilter1=epicsPV("X02DA-OP-FI1:READ")
chOPFilter2=epicsPV("X02DA-OP-FI2:READ")
chOPFilter3=epicsPV("X02DA-OP-FI3:READ")
chOPFilter4=epicsMotor('X02DA-OP-FI4:TRY')

# Box
chBoxModeSelection=epicsPV("X02DA-ES1-BOX:MODE_SEL")

chCamera=epicsPV("X02DA-ES1-CAM1:CAM_SEL")
chMicroscope=epicsPV("X02DA-ES1-MS:MS_SEL")
chScintillator=epicsPV("X02DA-ES1-MS1:SCINTIL")
chPixelSize=epicsPV("X02DA-ES1-CAM1:ACT_PIXL_SIZE")
chMagnification=epicsPV("X02DA-ES1-MS:MAGNF")

# DPC
chGridStartRaw=epicsPV("X02DA-SCAN-SCN1:GRIDMIN.VAL")
chGridEndRaw=epicsPV("X02DA-SCAN-SCN1:GRIDMAX.VAL")
chGridNSteps=epicsPV("X02DA-SCAN-SCN1:GRIDSTEP")
chGridNPeriods=epicsPV("X02DA-SCAN-SCN1:GRIDPER")
chPiezo=epicsMotor("X02DA-ES1-PZOSTG2:DTR1")
chActualStep=epicsPV("X02DA-SCAN-SCN1:ACTSTEP")
chMillisecondShutter=epicsPV("X02DA-ES1-MSSH1:EXP-MODE")
