from optparse import OptionParser
+import h5py as _h5py
from matplotlib.pyplot import close, get_fignums, figure, show
+
from calibcant.calibrate import load_all
from calibcant.analyze import analyze_all
options,args = p.parse_args(args)
filename = args[0]
+ with _h5py.File(filename) as f:
+ if options.group in f:
+ g = f[options.group]
+ if 'approach' in g:
+ position = g['approach/position'][...]
+ deflection = g['approach/deflection'][...]
+ fig = figure()
+ axes = fig.add_subplot(1, 1, 1)
+ axes.plot(position, deflection)
+ axes.set_title('Stepper approach')
+ axes.set_xlabel('position (steps)')
+ axes.set_ylabel('deflection (bits)')
calibrator,data,raw_data = load_all(filename=filename, group=options.group)
if not options.bumps:
raw_data['bump'] = []