hooke: Flesh out discussion of drivers and plugins
[thesis.git] / src / hooke / drivers.tex
1 \subsection{Drivers for loading unfolding pull data}
2 \label{sec:hooke:drivers}
3
4 \Hooke\ supports a number of different SMFS data formats, including
5 Hemingway\citep{materassi09}, JPK's \citetalias{force-robot}, Asylum's
6 MFP3D\citep{mfp-3d}, Bruker's \citetalias{picoforce}, and my
7 \unfoldprotein\ (\cref{sec:pyafm:unfold-protein}) formats.  The
8 drivers are responsible for loading curve data into a standardized
9 format so that plugins can work with data from any source.  Drivers
10 have can determine if they are capable of reading a particular file,
11 so if you need to analyze a directory full of curve files in a number
12 of formats, you can just point Hooke at the directory and it will pick
13 the appropriate driver for each curve.
14
15 After loading and parsing the data, drivers return a list of scaled
16 \emph{blocks} and a dictionary\footnote{
17   Python dictionaries are hash tables, which allow you to easily
18   access arbitrary data if you know the key under which it was stored.
19 } of metadata.  Each block corresponds to a different phase of the
20 experiment; standard unfolding experiments have an approach block and
21 a retraction block.  The piezo position and cantilever deflection data
22 in each block is scaled by the driver into meters, but further
23 processing (e.g. the conversion of cantilever position to a chain
24 tension in newtons) is carried out by plugins.  The metadata
25 dictionary includes standard keys for information that is required for
26 the analysis (e.g.~the calibrated spring constant in N/m).  If the
27 driver can parse any additional metadata from the file, it adds it to
28 the dictionary using non-standard keys.  You can use this auxilliary
29 metadata to perform subsequent analysis (e.g.~``give me all the curves
30 that were recorded in \texttt{PBS + 0.5M CaCl2}'').