Commit c1474216 authored by bliss administrator's avatar bliss administrator

PEL scan

Used by Hans-Peter to caracterize beamline motors
parent 125a650d
Pipeline #10096 canceled with stages
from bliss.common.scans import *
from bliss.common.plot import *
def PELscan(mot, p_st, p_en, nbp, t_int, *counters, **kwargs):
display_help = kwargs.pop('help', False)
if display_help:
print "PELscan(mot, start, stop, nbp, int_time, interf1, counter.... nbscan=n, backlash=val, bidir=True/False, sleep_time=t(s)"
nbs = kwargs.pop('nbs', 1)
backlash = kwargs.pop('backlash', 0)
bidir = kwargs.pop('bidir', False)
return_scan = kwargs.get('return_scan', False)
kwargs['return_scan'] = True
for loop in range(nbs):
if bidir and loop%2 == 1:
pos_bckl = p_en + backlash
pos_start = p_en
pos_end = p_st
pos_bckl = p_st - backlash
pos_start = p_st
pos_end = p_en
print "Move motor \"%s\" to %g"%(, pos_bckl)
print mot.position()
scan = ascan(mot, pos_start, pos_end, nbp, t_int, *counters, **kwargs)
data = get_data(scan)
# plot motor pos vs. counters by default
# do not plot interferometer since it doesn't give a useful result
counters_to_plot = [name for name in data.dtype.fields
if name not in ('timestamp', and not name.startswith('interf')]
# Plotting de-activated by CG 6 aug. 2018... causes crash with flint :(
# x = data[]
# y = data[counters_to_plot]
# plot(y, x=x)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment