46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
###################################################################################################
|
|
# Deployment specific global definitions - executed after startup.py
|
|
##################################################################################################
|
|
|
|
|
|
import ch.psi.fda.ProcessorFDA as ProcessorFDA
|
|
import ch.psi.pshell.crlogic.CrlogicPositioner as CrlogicPositioner
|
|
import ch.psi.pshell.crlogic.CrlogicSensor as CrlogicSensor
|
|
|
|
crlogic_config = {}
|
|
crlogic_config["class"] = "ch.psi.pshell.crlogic.CrlogicScan"
|
|
crlogic_config["prefix"] = "X10DA-ES1-CRL"
|
|
crlogic_config["ioc"] = "X10DA-VME-ES1"
|
|
crlogic_config["integrationTime"] = 0.2
|
|
crlogic_config["additionalBacklash"] = 0.01
|
|
|
|
|
|
crystal.setTrustedMonitor(True)
|
|
|
|
|
|
def setup_brag_plot(auto=True):
|
|
"""Defines plot range so that bragg motor using external encoder will be plotted
|
|
|
|
Args:
|
|
auto(bool): if True range is automatic. Else, it is calculated based on current offset.
|
|
|
|
Returns:
|
|
None
|
|
"""
|
|
if auto:
|
|
setup_plotting(range = "auto")
|
|
else:
|
|
offset = bragg.read() - bragg.readback.read()
|
|
setup_plotting(range = [scan_start - offset, scan_stop - offset])
|
|
|
|
|
|
#add_device(bragg.getExtEncoder(), True)
|
|
|
|
|
|
|
|
|
|
def run_fda(file_name, arguments={}):
|
|
"""
|
|
Run FDA loop
|
|
"""
|
|
ProcessorFDA().execute(file_name,arguments) |