diff --git a/config/devices.properties b/config/devices.properties index 53deb579..3a274dd8 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -27,7 +27,7 @@ LensMode=ch.psi.pshell.epics.ChannelString|X03DA-SCIENTA:cam1:LENS_MODE_RBV|Read DetectorMode=ch.psi.pshell.epics.ChannelString|X03DA-SCIENTA:cam1:DETECTOR_MODE_RBV|Read||true PassEnergy=ch.psi.pshell.epics.ChannelString|X03DA-SCIENTA:cam1:PASS_ENERGY_RBV|Read||true ElementSet=ch.psi.pshell.epics.ChannelString|X03DA-SCIENTA:cam1:ELEMENT_SET_RBV|Read||true -AnalyserSlit=ch.psi.pshell.epics.ChannelString|X03DA-SCIENTA:cam1:ANALYSER_SLIT_RBV|Read|| +#AnalyserSlit=ch.psi.pshell.epics.ChannelString|X03DA-SCIENTA:cam1:ANALYSER_SLIT_RBV|Read|| ScientaDwellTime=ch.psi.pshell.epics.ChannelDouble|X03DA-SCIENTA:cam1:AcquireTime_RBV|Read||true #AcquisitionModeNum=ch.psi.pshell.epics.ChannelDouble|X03DA-SCIENTA:cam1:ACQ_MODE_RBV|Read|| #EnergyModeNum=ch.psi.pshell.epics.ChannelDouble|X03DA-SCIENTA:cam1:ENERGY_MODE_RBV|Read|| diff --git a/config/settings.properties b/config/settings.properties index e2bc2926..a7680d72 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,7 +1,7 @@ -#Thu Aug 10 16:35:01 CEST 2023 +#Sat Aug 12 12:34:27 CEST 2023 pgroup=p17274 proposal=bl-dev proposer=bl-dev prefix= -sample= +sample=Au poly authors=Matthias Muntwiler diff --git a/config/variables.properties b/config/variables.properties index d0e006ad..c82d3d29 100644 --- a/config/variables.properties +++ b/config/variables.properties @@ -1,4 +1,4 @@ -#Thu Aug 10 20:10:36 CEST 2023 -LastRunDate=230810 -FileSequentialNumber=18568 -DaySequentialNumber=5 +#Sat Aug 12 12:45:53 CEST 2023 +LastRunDate=230812 +FileSequentialNumber=18569 +DaySequentialNumber=1 diff --git a/script/local.py b/script/local.py index e1452f4c..8ae1369f 100644 --- a/script/local.py +++ b/script/local.py @@ -343,7 +343,8 @@ def wait_beam(): time.sleep(0.1) print "Beam ok" -def before_readout(): +def is_scienta_sampling(): + global SENSORS sample_scienta = False for dev in ["Scienta.spectrum","EnergyDistribution", "AngleDistribution", "Scienta.dataMatrix", "Counts"]: if dev in SENSORS: @@ -353,6 +354,10 @@ def before_readout(): if dev in SENSORS: sample_scienta = True break + return sample_scienta + +def before_readout(): + sample_scienta = is_scienta_sampling() wait_beam() trig_keithleys() if sample_scienta: @@ -383,10 +388,13 @@ def after_scan(): def set_adc_averaging(dwelltime=0.0): if dwelltime == 0.0: - dwelltime = Scienta.getStepTime().read() + if is_scienta_sampling(): + dwelltime = Scienta.getStepTime().read() + fixed = AcquisitionMode.read() == "Fixed" + else: + fixed = True dwelltime = min(dwelltime, 20.0) dwelltime = max(dwelltime, 0.1) - fixed = AcquisitionMode.read() == "Fixed" else: fixed = True prepare_keithleys(dwelltime, fixed) @@ -398,7 +406,9 @@ def set_adc_averaging(dwelltime=0.0): def adjust_sensors(): #Updating ranges from Scienta - Scienta.update() + if is_scienta_sampling(): + Scienta.update() + global SENSORS if SENSORS is not None: # Move integration to end