Included TimeResolved scan
This commit is contained in:
@@ -1,8 +1,48 @@
|
||||
|
||||
if get_exec_pars().debug:
|
||||
print "Setting debug parameters"
|
||||
SCANS = 10
|
||||
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 , SCANS= cfg[0], cfg[1]
|
||||
print "FILE: ", FILE
|
||||
print "SCANS: ", SCANS
|
||||
|
||||
|
||||
"""
|
||||
scienta.getState().assertReady()
|
||||
current_spectrum=scienta.getSpectrum().take()
|
||||
scienta.start()
|
||||
|
||||
try:
|
||||
scienta.getSpectrum().waitValueNot(current_spectrum, -1)
|
||||
mscan(scienta.getSpectrum(), scienta.getSpectrum(), scienta.getIterations(), -1, take_initial=True)
|
||||
except:
|
||||
scienta.stop()
|
||||
scienta.zeroSupplies()
|
||||
|
||||
"""
|
||||
|
||||
|
||||
set_device_alias(scienta.getSpectrum(), "spectrum")
|
||||
|
||||
sensors=[i0, scienta.getSpectrum()]
|
||||
|
||||
def before_read(position, scan):
|
||||
trigger_scienta()
|
||||
|
||||
|
||||
mscan(scienta.getSpectrum(), scienta.getSpectrum(), scienta.getIterations() -1)
|
||||
dummy_trigger_scienta()
|
||||
|
||||
|
||||
try:
|
||||
tscan(sensors, SCANS, 0.001, before_read=before_read, after_read=after_readout, name = NAME)
|
||||
finally:
|
||||
scienta.zeroSupplies()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user