################################################################################################### # Deployment specific global definitions - executed after startup.py ################################################################################################## import ch.psi.pshell.crlogic.CrlogicPositioner as CrlogicPositioner import ch.psi.pshell.crlogic.CrlogicSensor as CrlogicSensor import ch.psi.pshell.epics.ChannelDouble as ChannelDouble import ch.psi.pshell.epics.ChannelDoubleArray as ChannelDoubleArray import ch.psi.pshell.epics.ChannelInteger as ChannelInteger import ch.psi.pshell.epics.ChannelIntegerArray as ChannelIntegerArray 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)