Script execution
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import ch.psi.pshell.device.DummyPositioner as DummyPositioner
|
||||
|
||||
#Energy #Pass Energy #Step Time
|
||||
STEPS = [ ( 136.0, 10 , 5.0),
|
||||
( 350.5, 20 , 5.0),
|
||||
( 400.0, 50 , 5.0),
|
||||
]
|
||||
|
||||
SETTLING_TIME = 0.0
|
||||
SENSORS = [Counts, MachineCurrent, SampleCurrent, RefCurrent, EnergyDistribution, Scienta.getDataMatrix()]
|
||||
ENDSCAN = False
|
||||
STEP_TIME = 5.0
|
||||
|
||||
class PassEnergy(Writable):
|
||||
def write(self, value):
|
||||
Scienta.setPassEnergy(50)
|
||||
|
||||
POSITIONERS = [Scienta.getCenterEnergy(), PassEnergy(), Scienta.getChild("Scienta step time")]
|
||||
|
||||
def scan_gen():
|
||||
while True:
|
||||
for step in STEPS:
|
||||
yield step
|
||||
|
||||
set_adc_averaging()
|
||||
Scienta.stepTime.write(STEP_TIME)
|
||||
|
||||
try:
|
||||
vscan( POSITIONERS,
|
||||
SENSORS,
|
||||
scan_gen(),
|
||||
line = True,
|
||||
latency=SETTLING_TIME,
|
||||
domain_axis = "Index",
|
||||
enabled_plots = POSITIONERS + SENSORS
|
||||
before_read = before_readout,
|
||||
after_read = after_readout)
|
||||
)
|
||||
finally:
|
||||
if ENDSCAN:
|
||||
after_scan()
|
||||
|
||||
Reference in New Issue
Block a user