Add TranslateFlatPeaksCommand.
authorW. Trevor King <wking@drexel.edu>
Tue, 10 Aug 2010 20:32:31 +0000 (16:32 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 10 Aug 2010 20:32:31 +0000 (16:32 -0400)
commit2dcaca882db0eae6d81fcbbc18c0b96fe92a00e7
treee3ce194ed2d33b61e213c21fc7fe463c57282f8e
parent907e8b93aae50c57ac40d43ddb2b31cf3618e3c9
Add TranslateFlatPeaksCommand.

This completes a simple velocity clamp force analysis approach.  Consider:

  ./bin/hooke -c 'load_playlist test/data/test'
              -c 'zero_block_surface_contact_point --block 1'
              -c 'add_flattened_extension_array --block 1 --max_degree 1
                      --input_deflection_column "surface deflection (m)"'
              -c 'add_block_force_array --block 1
                      --input_deflection_column "flattened deflection (m)"'
              -c 'add_block_cantilever_adjusted_extension_array --block 1'
              -c 'flat_filter_peaks --min_points 1'
              -c 'flat_peaks_to_polymer_peaks --block 1'
              -c 'polymer_fit_peaks --block 1'
              --command-no-exit

Still to come:
* Better contact point fitting or flattening, since the above method
  currently does a pretty bad job with the actual WLCs.  Perhaps a
  WLC-based zeroing could lead a second fitting iteration.
* A way to apply grouped commands like this to each curve in a playlist.
* Saving dicts in the playlist format or changing formats so the WLC
  fitting parameters are accessible for further analysis (e.g. with
  sawsim: http://dx.doi.org/10.1016/j.ijbiomac.2009.12.001 ).
hooke/plugin/flatfilt.py
hooke/plugin/polymer_fit.py