# Copyright (C) 2010 W. Trevor King # # This file is part of Hooke. # # Hooke is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Hooke is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with Hooke. If not, see # . """ >>> from hooke.hooke import Hooke, HookeRunner >>> h = Hooke() >>> r = HookeRunner() >>> h = r.run_lines(h, ['load_playlist test/data/test']) # doctest: +ELLIPSIS Success >>> h = r.run_lines(h, ... ['convert_distance_to_force --deflection_column "deflection (m)"'] ... ) # doctest: +ELLIPSIS, +REPORT_UDIFF Success >>> curve = h.playlists.current().current() >>> approach = curve.data[0] >>> approach.info['columns'] ['z piezo (m)', 'deflection (m)', 'deflection (N)'] >>> approach[:5,-1] # doctest: +ELLIPSIS Data([ 4.997...-09, 5.017...e-09, 5.032...e-09, 5.049...e-09, 5.067...e-09]) >>> approach[-5:,-1] # doctest: +ELLIPSIS Data([ 6.987...e-09, 6.999...e-09, 6.979...e-09, 6.962...e-09, 6.967...e-09]) Note that the rediculously high forces are because the deflection has not been zeroed (e.g. with 'zero surface contact point'). """