[65dfa99] | 1 | .. graph_help.rst |
---|
| 2 | |
---|
| 3 | .. This is a port of the original SasView html help file to ReSTructured text |
---|
| 4 | .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. |
---|
| 5 | |
---|
| 6 | .. |delta| unicode:: U+03B4 |
---|
| 7 | .. |phi| unicode:: U+03C6 |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | Plotting Data/Models |
---|
| 11 | ==================== |
---|
| 12 | |
---|
| 13 | SasView generates three different types of graph window: one that displays *1D data* |
---|
| 14 | (ie, I(Q) vs Q), one that displays *1D residuals* (ie, the difference between the |
---|
| 15 | experimental data and the theory at the same Q values), and *2D color maps*. |
---|
| 16 | |
---|
| 17 | Graph window options |
---|
| 18 | -------------------- |
---|
| 19 | |
---|
| 20 | .. _Invoking_the_graph_menu: |
---|
| 21 | |
---|
| 22 | Invoking the graph menu |
---|
| 23 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 24 | |
---|
| 25 | To invoke the *Graph Menu* simply right-click on a data/theory plot, or click |
---|
| 26 | the *Graph Menu* (bullet list) icon in the toolbar at the bottom of the plot. |
---|
| 27 | Then select a menu item. |
---|
| 28 | |
---|
| 29 | How to Hide-Show-Delete a graph |
---|
| 30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 31 | |
---|
| 32 | To expand a plot window, click the *Maximise* (square) icon in the top-right |
---|
| 33 | corner. |
---|
| 34 | |
---|
| 35 | To shrink a plot window, click the *Restore down* (square-on-square) icon in |
---|
| 36 | the top-right corner. |
---|
| 37 | |
---|
| 38 | To hide a plot, click the *Minimise* (-) icon in the top-right corner of the |
---|
| 39 | plot window. |
---|
| 40 | |
---|
| 41 | To show a hidden plot, select the *Restore up* (square-on-square) icon on the |
---|
| 42 | minimised window. |
---|
| 43 | |
---|
| 44 | To delete a plot, click the *Close* (x) icon in the top-right corner of the |
---|
| 45 | plot window. |
---|
| 46 | |
---|
| 47 | *NOTE! If a residuals graph (when fitting data) is hidden, it will not show up |
---|
| 48 | after computation.* |
---|
| 49 | |
---|
| 50 | Dragging a plot |
---|
| 51 | ^^^^^^^^^^^^^^^ |
---|
| 52 | |
---|
| 53 | Select the *Pan* (crossed arrows) icon in the toolbar at the bottom of the plot |
---|
| 54 | to activate this option. Move the mouse pointer to the plot. It will change to |
---|
| 55 | a hand. Then left-click and drag the plot around. The axis values will adjust |
---|
| 56 | accordingly. |
---|
| 57 | |
---|
| 58 | To disable dragging mode, unselect the *crossed arrows* icon on the toolbar. |
---|
| 59 | |
---|
| 60 | Zooming In-Out on a plot |
---|
| 61 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 62 | |
---|
| 63 | Select the *Zoom* (magnifying glass) button in the toolbar at the bottom of |
---|
| 64 | the plot to activate this option. Move the mouse pointer to the plot. It will |
---|
| 65 | change to a cross-hair. Then left-click and drag the pointer around to generate |
---|
| 66 | a region of interest. Release the mouse button to generate the new view. |
---|
| 67 | |
---|
| 68 | To disable zoom mode, unselect the *Zoom* button on the toolbar. |
---|
| 69 | |
---|
| 70 | After zooming in on a a region, the *left arrow* or *right arrow* buttons on |
---|
| 71 | the toolbar will switch between recent views. |
---|
| 72 | |
---|
| 73 | *NOTE! If a wheel mouse is available scrolling the wheel will zoom in/out |
---|
| 74 | on the current plot (changing both axes). Alternatively, point at the numbers |
---|
| 75 | on one axis and scroll the wheel to zoom in/out on just that axis.* |
---|
| 76 | |
---|
| 77 | To return to the original view of the data, click the the *Reset* (home) icon |
---|
| 78 | in the toolbar at the bottom of the plot (see Resetting_the_graph_ for further details). |
---|
| 79 | |
---|
| 80 | Saving a plot image |
---|
| 81 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 82 | |
---|
| 83 | To save the current plot as an image file, right click on the plot to bring up |
---|
| 84 | the *Graph Menu* (see Invoking_the_graph_menu_) and select *Save Image*. |
---|
| 85 | Alternatively, click on the *Save* (floppy disk) icon in the toolbar at the |
---|
| 86 | bottom of the plot. |
---|
| 87 | |
---|
| 88 | A dialog window will open. Select a folder, enter a filename, choose an output |
---|
| 89 | image type, and click *Save*. |
---|
| 90 | |
---|
| 91 | The currently supported image types are: |
---|
| 92 | |
---|
| 93 | * EPS (encapsulated postscript) |
---|
| 94 | * EMF (enhanced metafile) |
---|
| 95 | * JPG/JPEG (joint photographics experts group) |
---|
| 96 | * PDF (portable documant format) |
---|
| 97 | * PNG (portable network graphics) |
---|
| 98 | * PS (postscript) |
---|
| 99 | * RAW/RGBA (bitmap) |
---|
| 100 | * SVG/SVGA (scalable vector graphics) |
---|
| 101 | * TIF/TIFF (tagged iamge file) |
---|
| 102 | |
---|
| 103 | Printing a plot |
---|
| 104 | ^^^^^^^^^^^^^^^ |
---|
| 105 | |
---|
| 106 | To send the current plot to a printer, click on the *Print* (printer) icon in |
---|
| 107 | the toolbar at the bottom of the plot. |
---|
| 108 | |
---|
| 109 | .. _Resetting_the_graph: |
---|
| 110 | |
---|
| 111 | Resetting the graph |
---|
| 112 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 113 | |
---|
| 114 | To reset the axis range of a graph to its initial values select *Reset Graph |
---|
| 115 | Range* on the *Graph Menu* (see Invoking_the_graph_menu_). Alternatively, use |
---|
| 116 | the *Reset* (home) icon in the toolbar at the bottom of the plot. |
---|
| 117 | |
---|
| 118 | Modifying the graph |
---|
| 119 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 120 | |
---|
| 121 | From the *Graph Menu* (see Invoking_the_graph_menu_) it is also possible to |
---|
| 122 | make some custom modifications to plots, including: |
---|
| 123 | |
---|
| 124 | * changing the plot window title |
---|
| 125 | * changing the axis legend locations |
---|
| 126 | * changing the axis legend label text |
---|
| 127 | * changing the axis legend label units |
---|
| 128 | * changing the axis legend label font & font colour |
---|
| 129 | * adding/removing a text string |
---|
| 130 | * adding a grid overlay |
---|
| 131 | |
---|
| 132 | Changing scales |
---|
| 133 | ^^^^^^^^^^^^^^^ |
---|
| 134 | |
---|
| 135 | This menu option is only available with 1D data. |
---|
| 136 | |
---|
| 137 | From the *Graph Menu* (see Invoking_the_graph_menu_) select *Change Scale*. A |
---|
| 138 | dialog window will appear in which it is possible to choose different |
---|
| 139 | transformations of the x (usually Q) or y (usually I(Q)) axes, including: |
---|
| 140 | |
---|
| 141 | * x, x^2, x^4, ln(x), log10(x), log10(x^4) |
---|
| 142 | * y, 1/y, ln(y), y^2, y.(x^4), 1/sqrt(y), |
---|
| 143 | * log10(y), ln(y.x), ln(y.x^2), ln(y.x^4), log10(y.x^4) |
---|
| 144 | |
---|
| 145 | A *View* option includes short-cuts to common SAS transformations, such as: |
---|
| 146 | |
---|
| 147 | * linear |
---|
| 148 | * Guinier |
---|
| 149 | * X-sectional Guinier |
---|
| 150 | * Porod |
---|
| 151 | * Kratky |
---|
| 152 | |
---|
| 153 | For properly corrected and scaled data, these SAS transformations can be used |
---|
| 154 | to estimate, for example, Rg, rod diameter, or SANS incoherent background |
---|
| 155 | levels, via a linear fit (see Making_a_linear_fit_). |
---|
| 156 | |
---|
| 157 | Toggling scales |
---|
| 158 | ^^^^^^^^^^^^^^^ |
---|
| 159 | |
---|
| 160 | This menu option is only available with 2D data. |
---|
| 161 | |
---|
| 162 | From the *Graph Menu* (see Invoking_the_graph_menu_) select *Toggle Linear/Log |
---|
| 163 | Scale* to switch between a linear to log intensity scale. The type of scale |
---|
| 164 | selected is written alongside the colour scale. |
---|
| 165 | |
---|
| 166 | 2D color maps |
---|
| 167 | ^^^^^^^^^^^^^ |
---|
| 168 | |
---|
| 169 | This menu option is only available with 2D data. |
---|
| 170 | |
---|
| 171 | From the *Graph Menu* (see Invoking_the_graph_menu_) select *2D Color Map* to |
---|
| 172 | choose a different color scale for the image and/or change the maximum or |
---|
| 173 | minimum limits of the scale. |
---|
| 174 | |
---|
| 175 | Getting data coordinates |
---|
| 176 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 177 | |
---|
| 178 | Clicking anywhere in the plot window will cause the current coordinates to be |
---|
| 179 | displayed in the status bar at the very bottom-left of the SasView window. |
---|
| 180 | |
---|
| 181 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 182 | |
---|
| 183 | Dataset menu options |
---|
| 184 | -------------------- |
---|
| 185 | |
---|
| 186 | .. _Invoking_the_dataset_menu: |
---|
| 187 | |
---|
| 188 | Invoking the dataset menu |
---|
| 189 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 190 | |
---|
| 191 | From the *Graph Menu* (see Invoking_the_graph_menu_) highlight a plotted |
---|
| 192 | dataset. |
---|
| 193 | |
---|
| 194 | Getting data info |
---|
| 195 | ^^^^^^^^^^^^^^^^^ |
---|
| 196 | |
---|
| 197 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), highlight a data set |
---|
| 198 | and select *DataInfo* to bring up a data information dialog panel for that |
---|
| 199 | data set. |
---|
| 200 | |
---|
| 201 | Saving data |
---|
| 202 | ^^^^^^^^^^^ |
---|
| 203 | |
---|
| 204 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Save Points as |
---|
| 205 | a File* (if 1D data) or *Save as a file(DAT)* (if 2D data). A save dialog will |
---|
| 206 | appear. |
---|
| 207 | |
---|
| 208 | 1D data can be saved in either ASCII text (.TXT) or CanSAS/SASXML (.XML) |
---|
| 209 | formats (see :ref:`Formats`). |
---|
| 210 | |
---|
| 211 | 2D data can only be saved in the NIST 2D format (.DAT) (see :ref:`Formats`). |
---|
| 212 | |
---|
| 213 | .. _Making_a_linear_fit: |
---|
| 214 | |
---|
| 215 | Making a linear fit |
---|
| 216 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 217 | |
---|
| 218 | Linear fit performs a simple ( y(x)=ax+b ) linear fit within the plot window. |
---|
| 219 | |
---|
| 220 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Linear Fit*. A |
---|
| 221 | fitting dialog will appear. Set some initial parameters and data limits and |
---|
| 222 | click *Fit*. The fitted parameter values are displayed and the resulting line |
---|
| 223 | calculated from them is added to the plot. |
---|
| 224 | |
---|
| 225 | This option is most useful for performing simple Guinier, XS Guinier, and |
---|
| 226 | Porod type analyses, for example, to estimate Rg, a rod diameter, or incoherent |
---|
| 227 | background level, respectively. |
---|
| 228 | |
---|
| 229 | The following figure shows an example of a Guinier analysis using this option |
---|
| 230 | |
---|
| 231 | .. image:: guinier_fit.png |
---|
| 232 | |
---|
| 233 | Removing data from the plot |
---|
| 234 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 235 | |
---|
| 236 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Remove*. The |
---|
| 237 | selected data will be removed from the plot. |
---|
| 238 | |
---|
| 239 | *NOTE! This action cannot be undone.* |
---|
| 240 | |
---|
| 241 | Show-Hide error bars |
---|
| 242 | ^^^^^^^^^^^^^^^^^^^^ |
---|
| 243 | |
---|
| 244 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Show Error Bar* |
---|
| 245 | or *Hide Error Bar* to switch between showing/hiding the errors associated |
---|
| 246 | with the chosen dataset. |
---|
| 247 | |
---|
| 248 | Modify plot properties |
---|
| 249 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 250 | |
---|
| 251 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Modify Plot |
---|
| 252 | Property* to change the size, color, or shape of the displayed marker for the |
---|
| 253 | chosen dataset, or to change the dataset label that appears on the plot. |
---|
| 254 | |
---|
| 255 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 256 | |
---|
| 257 | 2D data averaging |
---|
| 258 | ----------------- |
---|
| 259 | |
---|
| 260 | Purpose |
---|
| 261 | ^^^^^^^ |
---|
| 262 | |
---|
| 263 | This feature is only available with 2D data. |
---|
| 264 | |
---|
| 265 | 2D data averaging allows you to perform different types of averages on your |
---|
| 266 | data. The region to be averaged is displayed in the plot window and its limits |
---|
| 267 | can be modified by dragging the boundaries around. |
---|
| 268 | |
---|
| 269 | How to average |
---|
| 270 | ^^^^^^^^^^^^^^ |
---|
| 271 | |
---|
| 272 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select one of the |
---|
| 273 | following averages |
---|
| 274 | |
---|
| 275 | * Perform Circular Average |
---|
| 276 | * Sector [Q view] |
---|
| 277 | * Annulus [Phi view] |
---|
| 278 | * Box sum |
---|
| 279 | * Box averaging in Qx |
---|
| 280 | * Box averaging on Qy |
---|
| 281 | |
---|
| 282 | A 'slicer' will appear (except for *Perform Circular Average*) in the plot that |
---|
| 283 | you can drag by clicking on a slicer's handle. When the handle is highlighted |
---|
| 284 | in red, it means that the slicer can move/change size. |
---|
| 285 | |
---|
| 286 | *NOTE! The slicer size will reset if you try to select a region greater than |
---|
| 287 | the size of the data.* |
---|
| 288 | |
---|
| 289 | Alternatively, once a 'slicer' is active you can also select the region to |
---|
| 290 | average by bringing back the *Dataset Menu* and selecting *Edit Slicer |
---|
| 291 | Parameters*. A dialog window will appear in which you can enter values to |
---|
| 292 | define a region or select the number of points to plot (*nbins*). |
---|
| 293 | |
---|
| 294 | A separate plot window will also have appeared, displaying the requested |
---|
| 295 | average. |
---|
| 296 | |
---|
| 297 | *NOTE! The displayed average only updates when input focus is moved back to |
---|
| 298 | that window; ie, when the mouse pointer is moved onto that plot.* |
---|
| 299 | |
---|
| 300 | Selecting *Box Sum* automatically brings up the 'Slicer Parameters' dialog in |
---|
| 301 | order to display the average numerically, rather than graphically. |
---|
| 302 | |
---|
| 303 | To remove a 'slicer', bring back the *Dataset menu* and select *Clear Slicer*. |
---|
| 304 | |
---|
| 305 | Unmasked circular average |
---|
| 306 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 307 | |
---|
| 308 | This operation will perform an average in constant Q-rings around the (x,y) |
---|
| 309 | pixel location of the beam center. |
---|
| 310 | |
---|
| 311 | Masked circular average |
---|
| 312 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 313 | |
---|
| 314 | This operation is the same as 'Unmasked Circular Average' except that any |
---|
| 315 | masked region is excluded. |
---|
| 316 | |
---|
| 317 | Sector average [Q View] |
---|
| 318 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 319 | |
---|
| 320 | This operation averages in constant Q-arcs. |
---|
| 321 | |
---|
| 322 | The width of the sector is specified in degrees (+/- |delta|\|phi|\) each side |
---|
| 323 | of the central angle (|phi|\). |
---|
| 324 | |
---|
| 325 | Annular average [|phi| View] |
---|
| 326 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 327 | |
---|
| 328 | This operation performs an average between two Q-values centered on (0,0), |
---|
| 329 | and averaged over a specified number of pixels. |
---|
| 330 | |
---|
| 331 | The data is returned as a function of angle (|phi|\) in degrees with zero |
---|
| 332 | degrees at the 3 O'clock position. |
---|
| 333 | |
---|
| 334 | Box sum |
---|
| 335 | ^^^^^^^ |
---|
| 336 | |
---|
| 337 | This operation performs a sum of counts in a 2D region of interest. |
---|
| 338 | |
---|
| 339 | When editing the slicer parameters, the user can enter the length and the width |
---|
| 340 | the rectangular slicer and the coordinates of the center of the rectangle. |
---|
| 341 | |
---|
| 342 | Box Averaging in Qx |
---|
| 343 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 344 | |
---|
| 345 | This operation computes an average I(Qx) for the region of interest. |
---|
| 346 | |
---|
| 347 | When editing the slicer parameters, the user can control the length and the |
---|
| 348 | width the rectangular slicer. The averaged output is calculated from constant |
---|
| 349 | bins with rectangular shape. The resultant Q values are nominal values, that |
---|
| 350 | is, the central value of each bin on the x-axis. |
---|
| 351 | |
---|
| 352 | Box Averaging in Qy |
---|
| 353 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 354 | |
---|
| 355 | This operation computes an average I(Qy) for the region of interest. |
---|
| 356 | |
---|
| 357 | When editing the slicer parameters, the user can control the length and the |
---|
| 358 | width the rectangular slicer. The averaged output is calculated from constant |
---|
| 359 | bins with rectangular shape. The resultant Q values are nominal values, that |
---|
| 360 | is, the central value of each bin on the x-axis. |
---|
| 361 | |
---|
| 362 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 363 | |
---|
| 364 | .. note:: This help document was last changed by Steve King, 01May2015 |
---|