1 # Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
3 # This file is part of Hooke.
5 # Hooke is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option) any
10 # Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with Hooke. If not, see <http://www.gnu.org/licenses/>.
19 Point data_logger to our test data.
23 >>> import data_logger
24 >>> data_logger.DEFAULT_PATH = os.path.join(
25 ... os.getcwd(), 'test', 'data', 'vclamp_wtk')
27 Adjust Hooke in case we don't have calibcant installed.
29 >>> from hooke.hooke import Hooke, HookeRunner
31 >>> h.config.set('wtk driver', 'cantilever calibration directory',
32 ... '${DEFAULT}/calibrate_cantilever')
35 Proceed with the test itself.
38 >>> playlist = os.path.join('test', 'data', 'vclamp_wtk', 'playlist')
39 >>> h = r.run_lines(h, ['load_playlist ' + playlist])
43 >>> h = r.run_lines(h, ['previous_curve'])
46 >>> h = r.run_lines(h, ['curve_info --enable-path'])
47 ... # doctest: +ELLIPSIS, +REPORT_UDIFF
48 path: .../test/data/vclamp_wtk/unfold/20100504/20100504151536_unfold
51 >>> h = r.run_lines(h, ['zero_surface_contact_point --block retract'])
52 ... # doctest: +ELLIPSIS, +REPORT_UDIFF
53 {'active fitted parameters': array([ 1.04..., 1.12..., 0.91...]),
54 'active parameters': array([ 1.04..., 1.12..., 0.91...]),
55 'convergence flag': ...,
56 'covariance matrix': array(...),
57 'data scale factor': Data(3.95...e-08),
58 'fitted parameters': [-8.3...e-08,
62 'initial parameters': [-8.0...e-08,