Binding energy scan
This commit is contained in:
1
script/queues/test.que
Normal file
1
script/queues/test.que
Normal file
@@ -0,0 +1 @@
|
||||
[ [ [ true, "parameters/Jerome_O_K_edge_BaF.ens", "", "Resume", "" ], [ true, "parameters/Na_K_edge_Yanisha.ens", "", "Resume", "" ] ] ]
|
||||
@@ -1,35 +1,43 @@
|
||||
|
||||
if get_exec_pars().source == CommandSource.ui:
|
||||
REGIONS = [[523.0, 527.0, 2.0], [527.0, 535.0, 4.0], [535.0, 558.0, 2.0]]
|
||||
NAME = None
|
||||
IOC_AUTO_SAVE = False
|
||||
DUMMY_TRIGGER = True #Trigger detector to update the array sizes and calibration
|
||||
|
||||
|
||||
|
||||
set_device_alias(scienta.getSpectrum(), "spectrum")
|
||||
set_device_alias(scienta.getDataMatrix(), "image")
|
||||
set_device_alias(scienta.stats[0], "sum")
|
||||
|
||||
sensors=[i0, scienta.stats[0], scienta.getSpectrum()] #), scienta.getDataMatrix()]
|
||||
|
||||
def trigger(position, scan):
|
||||
scienta.start()
|
||||
scienta.waitNewImage(-1)
|
||||
|
||||
|
||||
if DUMMY_TRIGGER:
|
||||
trigger(None, None)
|
||||
|
||||
|
||||
if IOC_AUTO_SAVE:
|
||||
capture.write(1)
|
||||
|
||||
|
||||
|
||||
try:
|
||||
rscan(energy, sensors, REGIONS, latency = 0.0, before_read=trigger, after_read=after_readout, name = NAME)
|
||||
finally:
|
||||
if IOC_AUTO_SAVE:
|
||||
capture.write(0)
|
||||
scienta.zeroSupplies()
|
||||
if get_exec_pars().debug:
|
||||
print "Setting debug parameters"
|
||||
REGIONS = [[523.0, 527.0, 2.0], [527.0, 535.0, 4.0], [535.0, 558.0, 2.0]]
|
||||
NAME = None
|
||||
FILE = None
|
||||
|
||||
if FILE:
|
||||
FILE = get_context().setup.expandPath("{home}/parameters/" + FILE)
|
||||
import json
|
||||
with open(FILE) as json_file:
|
||||
cfg = json.load(json_file)
|
||||
NAME , REGIONS= cfg[0][0][0], cfg[1]
|
||||
print "FILE: ", FILE
|
||||
print "NAME: ", NAME
|
||||
print "REGIONS: ", REGIONS
|
||||
|
||||
IOC_AUTO_SAVE = False
|
||||
DUMMY_TRIGGER = True #Trigger detector to update the array sizes and calibration
|
||||
|
||||
set_device_alias(scienta.getSpectrum(), "spectrum")
|
||||
set_device_alias(scienta.getDataMatrix(), "image")
|
||||
set_device_alias(scienta.stats[0], "sum")
|
||||
|
||||
sensors=[i0, scienta.stats[0], scienta.getSpectrum()] #), scienta.getDataMatrix()]
|
||||
|
||||
def trigger(position, scan):
|
||||
scienta.start()
|
||||
scienta.waitNewImage(-1)
|
||||
|
||||
|
||||
if DUMMY_TRIGGER:
|
||||
trigger(None, None)
|
||||
|
||||
|
||||
if IOC_AUTO_SAVE:
|
||||
capture.write(1)
|
||||
|
||||
try:
|
||||
rscan(energy, sensors, REGIONS, latency = 0.0, before_read=trigger, after_read=after_readout, name = NAME)
|
||||
finally:
|
||||
if IOC_AUTO_SAVE:
|
||||
capture.write(0)
|
||||
scienta.zeroSupplies()
|
||||
|
||||
1
script/test/test1.py
Normal file
1
script/test/test1.py
Normal file
@@ -0,0 +1 @@
|
||||
time.sleep(5.0)
|
||||
1
script/test/test2.py
Normal file
1
script/test/test2.py
Normal file
@@ -0,0 +1 @@
|
||||
time.sleep(5.0)
|
||||
1
script/test/test3.py
Normal file
1
script/test/test3.py
Normal file
@@ -0,0 +1 @@
|
||||
time.sleep(5.0)
|
||||
Reference in New Issue
Block a user