From: W. Trevor King Date: Fri, 20 Apr 2012 17:11:55 +0000 (-0400) Subject: Convert calibcant-analyze.py to work with load_all and analyze_all. X-Git-Tag: 0.8~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d398aafa043c1980c29d3fde5a8d6986c525a300;p=calibcant.git Convert calibcant-analyze.py to work with load_all and analyze_all. This catches that script up with commit 560f9f94abbdf396b9f624e03bdb2a1f6d840bd1 Author: W. Trevor King Date: Fri Mar 16 10:02:37 2012 -0400 Get calibcant working with the new load_from_config-based pyafm. --- diff --git a/bin/calibcant-analyze.py b/bin/calibcant-analyze.py index 0735b25..1d71579 100755 --- a/bin/calibcant-analyze.py +++ b/bin/calibcant-analyze.py @@ -22,8 +22,8 @@ from optparse import OptionParser -from matplotlib.pyplot import show -from calibcant.analyze import calib_analyze_all +from calibcant.calibrate import load_all +from calibcant.analyze import analyze_all def main(args): @@ -38,8 +38,11 @@ def main(args): options,args = p.parse_args(args) filename = args[0] - k,k_s = calib_analyze_all( - filename=filename, group=options.group, dry_run=options.dry_run) + calibrator,data,raw_data = load_all(filename=filename, group=options.group) + k,k_s = analyze_all( + config=calibrator.config, data=data, raw_data=raw_data, + filename=filename, group=options.group, plot=False, + dry_run=options.dry_run) print "New spring constant:" print "%g +/- %g N/m" % (k, k_s)