tags/hookeunfolding disastershttp://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/unfolding disastersikiwiki2011-04-19T20:43:45ZHookehttp://www.physics.drexel.edu/~wking/unfolding-disasters/posts/Hooke/2011-04-19T20:43:45Z2010-11-03T18:48:43Z
<p><span class="infobox">
Available in a <a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../hg/">hg</a> repository.<br />
Repository: <a href="http://www.physics.drexel.edu/~wking/code/hg/hgweb.cgi/hooke" rel="vcs-hg" title="hooke repository">hooke</a><br />
Author: W. Trevor King<br />
</span></p>
<p><a href="http://code.google.com/p/hooke/">Hooke</a> is a <a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Force_spectroscopy/">force spectroscopy</a> data analysis package. For
example, Hooke can extract unfolding forces from your experimental
data. You can then fit the unfolding forces to models using my
<a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/sawsim/">sawsim</a> simulator. Of course, some experiments (e.g. force clamp)
need no Monte Carlo analysis, so for those, Hooke alone provides a
complete analysis package.</p>
<h1>Getting started</h1>
<p>I've tested Hooke on Gentoo and Debian, and I've got an ebuild in my
<a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Gentoo_overlay/">Gentoo overlay</a>. It should also run fine on Windows, etc., but I
don't have easy access to Windows boxes with <a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Python/">Python</a>, so I don't
test it there as often.</p>
<p>See the <a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Hooke/README/">README</a>, <a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Hooke/html/">manual</a>, and <a href="http://pypi.python.org/pypi/Hooke/">PyPI page</a>
for more details.</p>
Numpydoc and Sphinx 1.0http://www.physics.drexel.edu/~wking/unfolding-disasters/posts/Numpydoc_and_Sphinx_1.0/2010-09-01T16:40:12Z2010-09-01T16:40:12Z
<p>I finally got around to upgrading the environment on the server that
autogenerates my <a href="http://www.physics.drexel.edu/~wking/rsrch/hooke/">Hooke
documentation</a>.
The new setup is:</p>
<ul>
<li><a href="http://www.python.org/">Python</a> 2.7 (previously Python 2.5)</li>
<li><a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/">Sphinx</a> 1.0.3 (previously Sphinx 0.6.5)</li>
<li><a href="http://pypi.python.org/pypi/numpydoc/0.3.1">Numpydoc</a> from the
current <a href="http://projects.scipy.org/numpy/browse_git">git source</a>
(previously 0.3.1, see <a href="http://projects.scipy.org/numpy/ticket/1489">numpy ticket
1489</a>)</li>
<li><a href="http://www.scons.org/">SCons</a> 2.0.1.r5134 (unchanged)</li>
</ul>
<p>The main effect of the change is that the <a href="http://www.physics.drexel.edu/~wking/rsrch/hooke/hooke/hooke.html">hooke module
documentation</a>
is now generated in its entirety, while the previous implementation
only generated documentation for Python 2.5-compatible submodules.</p>
Hooke-update-2http://www.physics.drexel.edu/~wking/unfolding-disasters/posts/Hooke-update-2/2010-08-30T18:00:24Z2010-08-30T17:38:40Z
<p>In <a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Hooke-update/">an earlier post</a>, I reported seeing <code>surface
distance (m) (m)</code> columns in my playlist files, but had been unable to
reproduce them. Today, after <a href="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/rev/59390d466f0d">fixing bugs with Curve
copying</a>,
I did reproduce them with:</p>
<pre><code>$ ./bin/hk.py
-c 'load_playlist test/data/vclamp_picoforce/playlist'
-c 'start_command_capture'
-c 'zero_surface_contact_point --block approach'
-c 'zero_surface_contact_point --block retract'
-c 'stop_command_capture'
-c 'apply_command_stack_to_playlist --enable-evaluate'
-c 'flat_filter_playlist --block retract --min_points 1'
Success
...
Failure
Expected a list of Peaks, not <class 'hooke.command.Failure'>:
surface distance (m) not in retract (['z piezo (m)', 'deflection (m)',
'surface distance (m) (m)', 'surface deflection (m) (m)']):
list.index(x): x not in list
</code></pre>
<p>It appears to be a problem with curve reloading, since it doesn't come
up when I use a playlist with less than 100 (<code>Playlist._max_loaded</code>)
curves.</p>
<p>I'll update this post once I've tracked down the culprit.</p>
<p>Update:
<a href="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/rev/230d4483c9da">fixed</a>.</p>
Hooke-updatehttp://www.physics.drexel.edu/~wking/unfolding-disasters/posts/Hooke-update/2010-08-30T17:38:40Z2010-08-27T20:24:55Z
<p>Minor tweaks to Hooke's <a href="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/rev/8c0882dfbaf5">command
stacks</a>. I can now execute the GUI alternative of</p>
<pre><code>./bin/hk.py
-c 'new_playlist'
-c 'glob_curves_to_playlist *'
-c 'start_command_capture'
-c 'zero_surface_contact_point --block retract'
-c 'stop_command_capture'
-c 'apply_command_stack_to_playlist'
-c 'curve_info'
-p
</code></pre>
<p>Issues resolved today:</p>
<ul>
<li>GUI-generated commands clogging the command stack instead of
being executed. Fixed with CommandMessage.explicit_user_call.</li>
<li>Playlist._loaded desyncronization from old 'apply command stack
to playlist'. Fixed with Playlist.unload().</li>
</ul>
<p>Update:</p>
<p>After <a href="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/rev/7ba2243a9b45">fixing up a few more
bugs</a>,
I successfully ran:</p>
<pre><code>./bin/hk.py
-c 'new_playlist'
-c 'glob_curves_to_playlist *'
-c 'start_command_capture'
-c 'zero_surface_contact_point --block retract'
-c 'flat_filter_peaks --block retract --min_points 1'
-c 'zero_surface_contact_point --block retract --ignore_after_last_peak_info_name "flat filter peaks"'
-c 'convert_distance_to_force --block retract --deflection_column "surface deflection (m)"'
-c 'remove_cantilever_from_extension --block retract'
-c 'flat_peaks_to_polymer_peaks --block retract'
-c 'polymer_fit_peaks --block retract'
-c 'stop_command_capture'
-c 'apply_command_stack_to_playlist --enable-evaluate'
-c 'save_playlist --output o.hkp'
</code></pre>
<p>on 2400 curves with the command line UI. Tomorrow I'll run through
those with the GUI.</p>
<p>Update:</p>
<p>I ran through with the above command with the GUI. Same results :D.
It did, however turn up a couple of outstanding issues:</p>
<ul>
<li>lots of useless <code>!!python/unicode 'retract'</code> tags. If the strings
are all in ASCII, I don't really care if they are loaded as unicode
or string objects.
(<a href="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/rev/302413fafa96">fixed</a>)</li>
<li><code>surface distance (m) (m)</code> column. Obviously someone is adding
units twice. I need to figure out who it is ;).
(<a href="http://www.physics.drexel.edu/~wking/unfolding-disasters/tags/hooke/../../posts/Hooke-update-2/">Reproduced</a>)</li>
</ul>