def ascan_wimagerh5_slow(self, imagerh5, motor, start, end, nsteps, nEvents, record=None): plan_duration = (nsteps * nEvents / 120. + 0.3 * (nsteps - 1) + 4) * 10 try: imagerh5.prepare(nSec=plan_duration) except: print('imager preparation failed') return daq.configure(nEvents, record=record, controls=[motor]) this_plan = scan([daq], motor, start, end, nsteps) # we assume DAQ runs at 120Hz (event code 40 or 140) # a DAQ transition time of 0.3 seconds # a DAQ start time of about 1 sec # two extra seconds. # one extra second to wait for hdf5 file to start being written imagerh5.write() time.sleep(1) RE(this_plan) imagerh5.write_stop()
def a3scan(self, m1, a1, b1, m2, a2, b2, m3, a3, b3, nsteps, nEvents, record=None): daq.configure(nEvents, record=record, controls=[m1, m2, m3]) RE(scan([daq], m1, a1, b1, m2, a2, b2, m3, a3, b3, nsteps))
def run_ascan_daq_noplot(mot, a, b, points, events_per_point, use_l3t=False): if RE.state != 'idle': RE.abort() daq.configure(events=events_per_point, use_l3t=use_l3t, controls=[mot]) RE(bp.scan([daq], mot, a, b, points))
def dscan(self, motor, start, end, nsteps, nEvents, record=None): daq.configure(nEvents, record=record, controls=[motor]) currPos = motor.wm() RE(scan([daq], motor, currPos + start, currPos + end, nsteps)) motor.mv(currPos)
def listscan(self, motor, posList, nEvents, record=None): currPos = motor.wm() daq.configure(nEvents, record=record, controls=[motor]) RE(list_scan([daq], motor, posList)) motor.mv(currPos)
def pvascan(self, motor, start, end, nsteps, nEvents, record=None): currPos = motor.get() daq.configure(nEvents, record=record, controls=[motor]) RE(scan([daq], motor, start, end, nsteps)) motor.put(currPos)
def takeRun(self, nEvents, record=None): daq.configure(events=120, record=record) daq.begin(events=nEvents) daq.wait() daq.end_run()