################################################################################ # PyDevice Support for Transfocator ################################################################################ # Next two lines set up some testing tools for energy -- can be commented out epicsEnvSet("MONOE","testMonoE") dbLoadRecords("${TOP}/db/energyTestTools.db","P=$(PREFIX), MONOE=$(MONOE), IDENERGY=testIDE") #CRL 1 (substitutions file NEEDS WORK) dbLoadTemplate("substitutions/pyDeviceTfor.substitutions","P=$(PREFIX)") pydev("stack_subFile = 'substitutions/pyDeviceTfor.substitutions'") # python code NEEDS WORK pydev("from pyTransfocator_single import singleTF") pydev("CRL1 = singleTF()") # Update the next line for the beamline energy epicsEnvSet("BLE","$(PREFIX)$(MONOE)") dbLoadRecords(""${TOP}/db/pyDevCRLsingle.db","P=$(PREFIX), N=1, OBJ=CRL1, STACK_THICK=0.050, MIN_THICK=0.003") # Update the next line for the beamline energy epicsEnvSet("BLE","$(PREFIX)$(MONOE)") dbLoadRecords("${TOP}/db/pyDevFilters.db","P=$(PREFIX), N=1, OBJ=filters, NUM=12, KEV=$(BLE)") # After iocInit, need to setup attenuation lookup table # filters_subFile - string holding name/rel. location of substitutions file loaded # loaded in dbLoadTemplate # 12 - number of filters in this case # 8.5 - beam energy in keV used for the initial lookup table setup -- can be updated # after startup doAfterIocInit("pydev('filters.setupLookupTable(filters_subFile, 12, energy = 8.5)')")