Skip some param translation in the JPK driver for channel-less segments.
[hooke.git] / doc / tutorial.txt
index be41a0dfc6fd503cbc566a65a2d29df7b74880c0..13e06944eec3bccfaa3c887dabf62bc80cc3053f 100644 (file)
@@ -200,6 +200,12 @@ will jump to the 14th curve in the zero-indexed playlist.
 Replace ``curve`` with ``playlist`` in the above commands to navigate
 around through the list of loaded playlists.
 
+Because the playlist name is usually saved in the playlist file
+itself, there is a ``name_playlist`` command that allows you to rename
+playlists on the fly.
+
+    hooke> name_playlist 'my old playlist'
+
 Taking notes
 ------------
 
@@ -302,9 +308,24 @@ ways.::
     hooke> remove_cantilever_from_extension --block retract
     hooke> flat_peaks_to_polymer_peaks --block retract
     hooke> polymer_fit_peaks --block retract
-    hooke> export_block --block retract --output myblock.dat
+    hooke> block_info --block retract --output data.yaml name 'polymer peak [0-9]*'
+
+This stores the fit parameters in the block's
+:attr:`~hooke.curve.Data.info` dictionary and also appends them to
+:file:`data.yaml` (see each command's `Help`_ for details).  To access
+the parameters, load :file:`data.yaml` with PyYAML_::
+
+    $ python
+    >>> import yaml
+    >>> import hooke.util.yaml
+    >>> data = yaml.load(open('data.yaml', 'r'))
+
+and extract your parameter::
+
+    >>> data['20071120a_i27_t33.100']['retract']['polymer peak 0']['contour length (m)']
+    2.124...e-08
 
-See each command's `Help`_ for details.
+.. _PyYAML: http://pyyaml.org/
 
 Command stacks
 ~~~~~~~~~~~~~~
@@ -362,7 +383,7 @@ freely jointed chain fitting`_ and `Command stacks`_.::
     hooke> remove_cantilever_from_extension --block retract
     hooke> flat_peaks_to_polymer_peaks --block retract
     hooke> polymer_fit_peaks --block retract
-    hooke> export_block --block retract --output myblock.dat
+    hooke> block_info --block retract --output data.yaml name 'polymer peak [0-9]*'
     hooke> stop_command_capture
     hooke> apply_command_stack_to_playlist