Fast curve review seems to be a GUI-specific feature.
[hooke.git] / doc / gui.txt
1 *****************
2 The GUI interface
3 *****************
4
5 Orignially by Rolf Schmidt <rschmidt@alcor.concordia.ca>.
6
7 Enable by selecting `gui` in your config file (see :doc:`config`)::
8
9     [user interfaces]
10     command line = False
11     gui = True
12
13 Interface
14 =========
15 Starting Hooke's GUI for the first time, you will see the central plot
16 area with the current plot surrounded by the following windows (the `F*`
17 key toggles the visibility of the panel):
18
19 * Commands (`F5`)
20 * Folders (`F6`)
21 * Note (`F7`)
22 * Output (`F8`)
23 * Playlists (`F9`)
24 * Properties (`F10`)
25 * Results (`F11`)
26
27 .. image:: img/gui_screenshot.jpg
28
29 Initially, the window will be rather small in order to work with small
30 screen resolutions.  Adjust the size and position to your liking.
31
32 Underneath the menus at thte top of the window there is a navigation
33 toolbar to switch from one curve to another (next/previous).
34
35 Plot area
36 =========
37
38 The plot area displays the current curve.  You can select the data
39 column to use as the x axis using the dropdown menu in the plot
40 navigation bar (under the plot, not to be confused with the navigation
41 bar under the menus).  You can select the columns to plot by clicking
42 the `y column(s)` button and checking interesting columns.  We suggest
43 you stick to columns with a single unit, and not try and dispay, for
44 example, both meters and newtons on the same y axis.
45
46 You can move about the plot using its navigation toolbar.  See the
47 `Matplotlib manual`_ for details.
48
49 .. _Matplotlib manual:
50   http://matplotlib.sourceforge.net/users/navigation_toolbar.html
51
52 You can measure distances and forces directly in the plot.  If you
53 want to know the coordinates of a single point, left click on it.  The
54 index and coordinates of the nearest data point will be displayed in
55 the status bar along with the x and y coordinates of your click.
56
57 To find the distance between two points, just issue the command
58 ``delta``.  You will be asked to click two points.  When you click a
59 point, a blue dot should appear.  When you click the second point, the
60 distances will appear in the output panel.  Hooke automatically
61 adjusts the position of the clicked point to the nearest point in the
62 graph, so you will be always measuring distances and forces between
63 points in the graph.
64
65 .. todo:: Implement blue dots and click handler.
66
67 Folders
68 =======
69 Here you can navigate your file system and double click on a saved
70 playlist to open it.  You can change the initial folder by modifying
71 `workdir` in the `preferences` (core plugin).
72
73 .. todo:: Implement folders panel.
74
75 Playlists
76 =========
77 You can manage several playlists in this window.  As the GUI is rather
78 flexible, it is possible to display the curves from different
79 playlists side by side to compare them (relatively handy when
80 comparing different fit parameters).  You can double-click a file in
81 the playlist to display it in the plot area.  Deleting entire playlists
82 or single files can be accomplished by right-clicking and selecting
83 `Delete`.
84
85 .. todo:: Do we need side-by-side comparison?  How did this work in
86   the old GUI?
87
88 Commands
89 ========
90 All available commands are listed under their corresponding plugin.
91 In order to see a plugin and its commands, you have to edit
92 :file:`hooke.conf` and enable th plugin in the plugins section.
93 Selecting a plugin or command will display the associated properties
94 in the `Properties`_ window.  You can edit the properties and click
95 `Execute` to run the selected command.  If you do not need to modify
96 any properties, you can also double-click a command to run it.
97
98 Mousing over a plugin or command in the `Commands`_ window will
99 display the associated help in a tooltip.  The help for the plugin
100 should give a general description of the plugin.  The help for a
101 command should describe the properties available for this command and
102 suggest reasonable default values if possible.  Feel free to point out
103 missing help content.
104
105 Properties
106 ==========
107 The properties for the command selected in the `Commands`_ window are
108 displayed here.  Edit the properties to your satisfaction (some need to
109 be confirmed by hitting enter, this seems to be a problem in
110 wxPropertyGrid) and click the `Execute` button to run the selected
111 command.  Floating point values are limited to a certain number of
112 decimals (limitation of wxPropertyGrid?) so be careful when using
113 floating point values.
114
115 .. todo:: Document new, non-PropGrid
116   :mod:`~hooke.ui.gui.panel.propertyeditor`.
117
118 Results
119 =======
120 The results from the `autopeak` or `multidistance` commands are
121 displayed here.  Initially, all results are checked (i.e. visible).  If
122 you want to hide a result, simply uncheck it.  Hidden curves will not
123 be exported either.  You can only display one type of fit result (WLC,
124 FJC, etc.) at a time and you can switch between result types (results
125 plugin - show_results).
126
127 .. todo:: Results panel not yet re-implemented.
128
129 Output
130 ======
131 The Output window serves as a log where pertinent information is
132 displayed.  The output is generally the same as what you would see if
133 you were running the commands from the command line.
134
135 Note
136 ====
137 A note can be added to every curve: enter your note and click `Update
138 note`.  With the `note filter playlist` command (`playlist` plugin)
139 you can copy all the curves with a note into a new playlist.
140
141 General remarks
142 ===============
143 Read :doc:`hacking` for an overview of how Hooke works internally and
144 :doc:`config` for more information about configuring Hooke.
145
146 Ignore the text on the `Welcome` tab.  This tab is more like a proof of
147 principle and will contain a short how-to in the future (once the
148 howto is written).
149
150 Hooke's GUI will remember the size and position of the main window
151 (stored in the config file, see :doc:`config`).  You can arrange the
152 panels any which way you like and save this arrangement as a
153 perspective.
154
155 .. image:: img/gui_perspective.jpg
156
157 Hooke will always start with the last used perspective and you can
158 switch from one perspective to another by selecting a perspective from
159 the perspectives menu.  After deleting a perspective, the radio
160 indicator in the perspectives menu disappears (known bug in
161 wxPython).  This is only a visual problem and does not affect anything
162 else.
163
164 In order to pan the plot, zoom in and out and export the plot of your
165 force curves, use the plot toolbar under the plot.  A more detailed
166 description is available on the `Matplotlib website`_
167
168 .. _Matplotlib website:
169   http://matplotlib.sourceforge.net/users/navigation_toolbar.html
170
171 Some plugins and commands
172 =========================
173
174 * overlay (export): exports all retraction curves in a playlist on the
175   same scale.  This is achieved by determining the maximum x window and
176   adding x(max) and x(min) to all curves that are shorter than the
177   maximum x window.  Make sure to filter your playlist before running
178   this command!
179
180 .. todo:: Implement overlay.
181
182 Basic analysis and autopeak
183 ===========================
184
185 .. todo:: Implement autopeak.  Bring in autopeak tutorial from the wiki?
186
187 Please follow the steps in the :doc:`tutorial`.  Instead of typing in
188 the command at the command-line, select it in the `Commands`_ window,
189 set your properties in the `Properties`_ window and click on
190 `Execute` back in the `Commands`_ window.
191
192 The :doc:`autopeak` tutorial is also applicable.  You need to setup the
193 type of fit you want to use: in the Properties of the autopeak command
194 (autopeak plugin) select `WLC`, `FJC` or `FJC_PEG` from the dropdown
195 list for the `polymer model` argument of `polymer fit`.
196
197 Fast curve reviewing and saving
198 ===============================
199 .. todo:: Update curve review tutorial section.
200
201 When automatic routines are not good enough to filter your data, use
202 ``review`` command to cycle through your playlist presenting ten
203 curves in the same graph.  You can then enter the numbers of the
204 interesting curves and automatically save a copy of them into another
205 directory.