diff --git a/script/local.py b/script/local.py index 35f9eedc..2c13097a 100644 --- a/script/local.py +++ b/script/local.py @@ -327,11 +327,14 @@ def after_scan(): caput("X03DA-PC:AFTER-SCAN.PROC", 1) release_keithleys() -def set_adc_averaging(): - dwell = Scienta.getStepTime().read() - dwell = min(dwell, 20.0) - dwell = max(dwell, 0.1) - fixed = AcquisitionMode.read() == "Fixed" +def set_adc_averaging(dwelltime=0.0): + if dwelltime == 0: + dwell = Scienta.getStepTime().read() + dwell = min(dwell, 20.0) + dwell = max(dwell, 0.1) + fixed = AcquisitionMode.read() == "Fixed" + else: + fixed = True prepare_keithleys(dwell, fixed) #value = Scienta.getStepTime().read() * 10.0 #averaging count in 100ms #SampleCurrentAveraging.write(value) diff --git a/script/optics/ExitSlitYScan.py b/script/optics/ExitSlitYScan.py index 97a3550b..c0aa2591 100644 --- a/script/optics/ExitSlitYScan.py +++ b/script/optics/ExitSlitYScan.py @@ -12,5 +12,6 @@ STEPS = 0.01 LATENCY = 0.1 DWELL = 1.0 +set_adc_averaging(dwelltime=DWELL) lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=before_readout, after_read=after_readout) diff --git a/script/optics/FrontEndBladeScanKei.py b/script/optics/FrontEndBladeScanKei.py index aec6331a..4af2aa64 100644 --- a/script/optics/FrontEndBladeScanKei.py +++ b/script/optics/FrontEndBladeScanKei.py @@ -2,6 +2,7 @@ front end calibration scans keithley 2: RMU +set keithley manually to "poll curr medi" """ import time @@ -43,7 +44,7 @@ caput("X03DA-PGM:rontheta.A", +87.0) #MonoBeta.waitValueInRange(-87.01, -86.99, 100000) #MonoTheta.waitValueInRange(+86.99, +87.01, 100000) -POSITIONERS = (FrontendBladeUp,) +POSITIONERS = (FrontendBladeUp) FrontendBladeUp.write(STARTPOS) FrontendBladeDown.write(-2.0) time.sleep(5.0)