def setup_logging(): '''Defines the parameters to be recorded during the scan''' macros.init_logging() macros.add_logging_PV('filename', 'GE1:cam1:FileName_RBV',as_string=True) macros.add_logging_PV('ge1_num','GE1:cam1:FileNumber') #macros.add_logging_PV('ge2_num','GE2:cam1:FileNumber') macros.add_logging_PV('ScintX','ScintX:TIFF1:FileNumber') macros.add_logging_PV('ge3_num','GE3:cam1:FileNumber') macros.add_logging_PV('ge4_num','GE4:cam1:FileNumber') macros.add_logging_PV('ge1_time','GE1:cam1:AcquireTime_RBV') macros.add_logging_PV('ge1_frames','GE1:cam1:NumImages_RBV') for i in (0,1,2,8,11,12,13): macros.add_logging_scaler(i) macros.add_logging_motor(spec.JJHAp) macros.add_logging_motor(spec.JJVAp) macros.add_logging_PV('Iring',"BL01:srCurrent") macros.add_logging_PV('energy',"1id:userTran3.A") macros.add_logging_PV('energy',"1id:userTran3.A") # want cal macros.add_logging_PV('preamp1',"1idc:A3sens_num.VAL") macros.add_logging_PV('preamp2',"1idc:A4sens_num.VAL") macros.add_logging_motor(spec.samX) macros.add_logging_motor(motor1) macros.add_logging_motor(spec.samZ) macros.add_logging_motor(motor3) macros.add_logging_motor(spec.hydraZ) macros.add_logging_motor(motor2) macros.add_logging_PV('keyence1',"1id:Keyence:1:ch1.VAL") macros.add_logging_PV('keyence2',"1id:Keyence:1:ch2.VAL") macros.add_logging_PV('cross',"1id:D2Ch1_calc.VAL") macros.add_logging_PV('load',"1id:D2Ch2_calc.VAL") macros.add_logging_PV('mts3',"1id:D2Ch3_calc.VAL") macros.add_logging_PV('mts4',"1id:D2Ch4_calc.VAL") macros.add_logging_PV('temp1',"1id:ET_RI:Temp1") macros.add_logging_PV('temp2',"1id:ET_RI:Temp2") macros.add_logging_PV('temp3',"1id:ET_RI:Temp3") macros.add_logging_PV('tempX',"1id:ET_RI:Temp3")
GE_prefix = 'GE2:cam1:' #GE_fnum = ep.PV(GE_prefix+"FileNumber") GE_fname = ep.PV(GE_prefix+"FileName") GE_tframe = ep.PV(GE_prefix+"AcquireTime") GE_Nframe = ep.PV(GE_prefix+'NumImages') GE_Acquire = ep.PV(GE_prefix+'Acquire') GE_address = ep.PV(GE_prefix+'DetectorState_RBV') def sleep(timesec): time.sleep(timesec) ############################################################################################################### mac.init_logging() mac.add_logging_PV('GE_fname',GE_prefix+"FileName",as_string=True) mac.add_logging_PV('GE_fnum',GE_prefix+"FileNumber") mac.add_logging_PV('GE_tframe', GE_prefix+"AcquireTime") mac.add_logging_PV('GE_Nframe',GE_prefix+'NumImages') mac.add_logging_Global('S0','spec.S[0]') mac.add_logging_Global('S1','spec.S[1]') mac.add_logging_Global('S2','spec.S[2]') mac.add_logging_Global('S8','spec.S[8]') mac.add_logging_Global('S9','spec.S[9]') mac.add_logging_Global('S10','spec.S[10]') mac.add_logging_Global('S11','spec.S[11]') mac.add_logging_PV('p1Hs',"1idc:m62.RBV") mac.add_logging_PV('p1Vs',"1idc:m64.RBV") mac.add_logging_PV('Iring',"BL01:srCurrent") mac.add_logging_PV('energy',"1id:userTran3.A")