From: W. Trevor King Date: Tue, 17 Aug 2010 13:21:18 +0000 (-0400) Subject: Added 'Command stack' section to doc/tutorial.txt X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=210fa5e56daefc11ba83b64bdef2d8f94246e2f4;p=hooke.git Added 'Command stack' section to doc/tutorial.txt --- diff --git a/doc/tutorial.txt b/doc/tutorial.txt index 80dfb53..4ae616b 100644 --- a/doc/tutorial.txt +++ b/doc/tutorial.txt @@ -291,7 +291,7 @@ that create new data columns (e.g. `deflection (N)`) or store information in a curve's `info` dictionary (e.g. `flat filter peaks`). You can, if necessary, adjust the names of input and output columns and `info` values to combine the available commands in new and useful -ways. +ways.:: hooke> zero_surface_contact_point --block retract hooke> flat_filter_peaks --block retract --min_points 1 @@ -306,7 +306,32 @@ ways. See each command's `Help`_ for details. -.. todo:: Discuss command stacks and polymer model fitting. +Command stacks +~~~~~~~~~~~~~~ + +Since you are likely to apply similar analysis to several curves, +Hooke provides :mod:`command stacks ` for +bundling groups of commands.:: + + hooke> start_command_capture + hooke> zero_surface_contact_point --block retract + hooke> flat_filter_peaks --block retract --min_points 1 + ... + hooke> stop_command_capture + +You can check the state of the command stack with +``get_command_stack`` and the state of capture with +``get_command_capture_state``. If you make mistakes, you can pop +commands from the stack with ``pop_command_from_stack``. If you stop +capturing a command stack (e.g. to test a complicated command before +continuing), you can continue adding to the same stack with +``restart_command_capture.`` + +You can also save command stacks to disk (and reload them later, +potentially in a different Hooke session). + + hooke> save_command_stack --output my_stack + hooke> load_command_stack --input my_stack Multiple curve fitting and measuring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/test/tutorial.py b/test/tutorial.py index 7e9ec33..6a6ea6c 100644 --- a/test/tutorial.py +++ b/test/tutorial.py @@ -231,6 +231,10 @@ See :file:`delta.py`. *Worm like chain and freely jointed chain fitting* +*Command stacks* + +See :file:`command_stack.py`and :file:`command_stack_save_load.py`. + *Multiple curve fitting and measuring* *Fast curve reviewing and saving*