Script execution
This commit is contained in:
34
script/ScriptingExample.py
Normal file
34
script/ScriptingExample.py
Normal file
@@ -0,0 +1,34 @@
|
||||
set_adc_averaging()
|
||||
|
||||
|
||||
|
||||
|
||||
#ascan((ManipulatorPhi, ManipulatorTheta, Scienta.centerEnergy), (Counts, Scienta.image), (-1,-1,50), (1,1,70), (5,5,1), relative = True, zigzag = True, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
set_context(name = "test")
|
||||
|
||||
class PseudoDevice(RegisterBase):
|
||||
def doRead(self):
|
||||
#return take()
|
||||
return Scienta.getCenterEnergy().read()
|
||||
|
||||
def doWrite(self, val):
|
||||
print val
|
||||
if val == 50.0:
|
||||
print "1"
|
||||
else:
|
||||
print "2"
|
||||
Scienta.getCenterEnergy().write(val)
|
||||
|
||||
|
||||
|
||||
add_device(PseudoDevice("pseudo_device"), True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ascan((ManipulatorPhi, ManipulatorTheta, pseudo_device), (Counts, Scienta.image), (9.5,7.5,50.0), (10.5,8.5,70.0), (5,5,1), zigzag = True, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
|
||||
#after_scan()
|
||||
Reference in New Issue
Block a user