[23a9beb] | 1 | .. graph_help.rst |
---|
[0d66541] | 2 | |
---|
[78f02c3] | 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 | |
---|
[3fd3d5a4] | 6 | .. |delta| unicode:: U+03B4 |
---|
| 7 | .. |phi| unicode:: U+03C6 |
---|
| 8 | |
---|
| 9 | |
---|
[37bbd5f] | 10 | Plotting Data/Models |
---|
| 11 | ==================== |
---|
| 12 | |
---|
[96423f8] | 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 | |
---|
[0cdf1af] | 17 | Graph window options |
---|
[3fd3d5a4] | 18 | -------------------- |
---|
[78f02c3] | 19 | |
---|
[0cdf1af] | 20 | .. _Invoking_the_graph_menu: |
---|
[78f02c3] | 21 | |
---|
[0cdf1af] | 22 | Invoking the graph menu |
---|
| 23 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 28 | |
---|
[0cdf1af] | 29 | How to Hide-Show-Delete a graph |
---|
| 30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 31 | |
---|
[3fd3d5a4] | 32 | To expand a plot window, click the *Maximise* (square) icon in the top-right |
---|
| 33 | corner. |
---|
[78f02c3] | 34 | |
---|
[3fd3d5a4] | 35 | To shrink a plot window, click the *Restore down* (square-on-square) icon in |
---|
| 36 | the top-right corner. |
---|
[78f02c3] | 37 | |
---|
[3fd3d5a4] | 38 | To hide a plot, click the *Minimise* (-) icon in the top-right corner of the |
---|
| 39 | plot window. |
---|
[23a9beb] | 40 | |
---|
[3fd3d5a4] | 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 | |
---|
[0cdf1af] | 50 | Dragging a plot |
---|
| 51 | ^^^^^^^^^^^^^^^ |
---|
[23a9beb] | 52 | |
---|
[3fd3d5a4] | 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. |
---|
[23a9beb] | 59 | |
---|
[0cdf1af] | 60 | Zooming In-Out on a plot |
---|
| 61 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 62 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 67 | |
---|
[3fd3d5a4] | 68 | To disable zoom mode, unselect the *Zoom* button on the toolbar. |
---|
[78f02c3] | 69 | |
---|
[3fd3d5a4] | 70 | After zooming in on a a region, the *left arrow* or *right arrow* buttons on |
---|
| 71 | the toolbar will switch between recent views. |
---|
[78f02c3] | 72 | |
---|
[3fd3d5a4] | 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.* |
---|
[78f02c3] | 76 | |
---|
[3fd3d5a4] | 77 | To return to the original view of the data, click the the *Reset* (home) icon |
---|
[0cdf1af] | 78 | in the toolbar at the bottom of the plot (see Resetting_the_graph_ for further details). |
---|
[23a9beb] | 79 | |
---|
[0cdf1af] | 80 | Saving a plot image |
---|
| 81 | ^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 82 | |
---|
[3fd3d5a4] | 83 | To save the current plot as an image file, right click on the plot to bring up |
---|
[0cdf1af] | 84 | the *Graph Menu* (see Invoking_the_graph_menu_) and select *Save Image*. |
---|
[3fd3d5a4] | 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 | |
---|
[0cdf1af] | 103 | Printing a plot |
---|
| 104 | ^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 105 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 108 | |
---|
[0cdf1af] | 109 | .. _Resetting_the_graph: |
---|
[3fd3d5a4] | 110 | |
---|
[0cdf1af] | 111 | Resetting the graph |
---|
| 112 | ^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 113 | |
---|
[3fd3d5a4] | 114 | To reset the axis range of a graph to its initial values select *Reset Graph |
---|
[0cdf1af] | 115 | Range* on the *Graph Menu* (see Invoking_the_graph_menu_). Alternatively, use |
---|
[3fd3d5a4] | 116 | the *Reset* (home) icon in the toolbar at the bottom of the plot. |
---|
[78f02c3] | 117 | |
---|
[0cdf1af] | 118 | Modifying the graph |
---|
| 119 | ^^^^^^^^^^^^^^^^^^^ |
---|
[23a9beb] | 120 | |
---|
[0cdf1af] | 121 | From the *Graph Menu* (see Invoking_the_graph_menu_) it is also possible to |
---|
[3fd3d5a4] | 122 | make some custom modifications to plots, including: |
---|
[23a9beb] | 123 | |
---|
[3fd3d5a4] | 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 |
---|
[23a9beb] | 131 | |
---|
[0cdf1af] | 132 | Changing scales |
---|
| 133 | ^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 134 | |
---|
[3fd3d5a4] | 135 | This menu option is only available with 1D data. |
---|
| 136 | |
---|
[0cdf1af] | 137 | From the *Graph Menu* (see Invoking_the_graph_menu_) select *Change Scale*. A |
---|
[3fd3d5a4] | 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 |
---|
[0cdf1af] | 155 | levels, via a linear fit (see Making_a_linear_fit_). |
---|
[3fd3d5a4] | 156 | |
---|
[0cdf1af] | 157 | Toggling scales |
---|
| 158 | ^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 159 | |
---|
| 160 | This menu option is only available with 2D data. |
---|
| 161 | |
---|
[0cdf1af] | 162 | From the *Graph Menu* (see Invoking_the_graph_menu_) select *Toggle Linear/Log |
---|
[3fd3d5a4] | 163 | Scale* to switch between a linear to log intensity scale. The type of scale |
---|
| 164 | selected is written alongside the colour scale. |
---|
| 165 | |
---|
[0cdf1af] | 166 | 2D color maps |
---|
| 167 | ^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 168 | |
---|
| 169 | This menu option is only available with 2D data. |
---|
| 170 | |
---|
[a9dc4eb] | 171 | From the *Graph Menu* (see Invoking_the_graph_menu_) select *2D Color Map* to |
---|
[3fd3d5a4] | 172 | choose a different color scale for the image and/or change the maximum or |
---|
| 173 | minimum limits of the scale. |
---|
| 174 | |
---|
[0cdf1af] | 175 | Getting data coordinates |
---|
| 176 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 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 |
---|
[23a9beb] | 182 | |
---|
[0cdf1af] | 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 |
---|
[3fd3d5a4] | 192 | dataset. |
---|
| 193 | |
---|
[0cdf1af] | 194 | Getting data info |
---|
| 195 | ^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 196 | |
---|
[0cdf1af] | 197 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), highlight a data set |
---|
[3fd3d5a4] | 198 | and select *DataInfo* to bring up a data information dialog panel for that |
---|
| 199 | data set. |
---|
| 200 | |
---|
[0cdf1af] | 201 | Saving data |
---|
| 202 | ^^^^^^^^^^^ |
---|
[3fd3d5a4] | 203 | |
---|
[0cdf1af] | 204 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Save Points as |
---|
[3fd3d5a4] | 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) |
---|
[a9dc4eb] | 209 | formats (see :ref:`Formats`). |
---|
[1394952] | 210 | |
---|
[a9dc4eb] | 211 | 2D data can only be saved in the NIST 2D format (.DAT) (see :ref:`Formats`). |
---|
[78f02c3] | 212 | |
---|
[0cdf1af] | 213 | .. _Making_a_linear_fit: |
---|
[78f02c3] | 214 | |
---|
[0cdf1af] | 215 | Making a linear fit |
---|
| 216 | ^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 217 | |
---|
[3fd3d5a4] | 218 | Linear fit performs a simple ( y(x)=ax+b ) linear fit within the plot window. |
---|
| 219 | |
---|
[0cdf1af] | 220 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Linear Fit*. A |
---|
[3fd3d5a4] | 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 |
---|
[78f02c3] | 230 | |
---|
| 231 | .. image:: guinier_fit.png |
---|
| 232 | |
---|
[0cdf1af] | 233 | Removing data from the plot |
---|
| 234 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 235 | |
---|
[0cdf1af] | 236 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Remove*. The |
---|
[3fd3d5a4] | 237 | selected data will be removed from the plot. |
---|
| 238 | |
---|
| 239 | *NOTE! This action cannot be undone.* |
---|
[78f02c3] | 240 | |
---|
[0cdf1af] | 241 | Show-Hide error bars |
---|
| 242 | ^^^^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 243 | |
---|
[0cdf1af] | 244 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Show Error Bar* |
---|
[3fd3d5a4] | 245 | or *Hide Error Bar* to switch between showing/hiding the errors associated |
---|
| 246 | with the chosen dataset. |
---|
| 247 | |
---|
[0cdf1af] | 248 | Modify plot properties |
---|
| 249 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 250 | |
---|
[0cdf1af] | 251 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Modify Plot |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 254 | |
---|
| 255 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 256 | |
---|
[0cdf1af] | 257 | 2D data averaging |
---|
[78f02c3] | 258 | ----------------- |
---|
| 259 | |
---|
[3fd3d5a4] | 260 | Purpose |
---|
[0cdf1af] | 261 | ^^^^^^^ |
---|
[3fd3d5a4] | 262 | |
---|
| 263 | This feature is only available with 2D data. |
---|
[23a9beb] | 264 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 268 | |
---|
[0cdf1af] | 269 | How to average |
---|
| 270 | ^^^^^^^^^^^^^^ |
---|
[78f02c3] | 271 | |
---|
[0cdf1af] | 272 | In the *Dataset Menu* (see Invoking_the_dataset_menu_), select one of the |
---|
[3fd3d5a4] | 273 | following averages |
---|
[78f02c3] | 274 | |
---|
[3fd3d5a4] | 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 |
---|
[78f02c3] | 281 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 285 | |
---|
[3fd3d5a4] | 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*. |
---|
[78f02c3] | 304 | |
---|
[0cdf1af] | 305 | Unmasked circular average |
---|
| 306 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[23a9beb] | 307 | |
---|
[3fd3d5a4] | 308 | This operation will perform an average in constant Q-rings around the (x,y) |
---|
| 309 | pixel location of the beam center. |
---|
[78f02c3] | 310 | |
---|
[0cdf1af] | 311 | Masked circular average |
---|
| 312 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 313 | |
---|
[3fd3d5a4] | 314 | This operation is the same as 'Unmasked Circular Average' except that any |
---|
| 315 | masked region is excluded. |
---|
[78f02c3] | 316 | |
---|
[0cdf1af] | 317 | Sector average [Q View] |
---|
| 318 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[23a9beb] | 319 | |
---|
[3fd3d5a4] | 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|\). |
---|
[78f02c3] | 324 | |
---|
[0cdf1af] | 325 | Annular average [|phi| View] |
---|
| 326 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[3fd3d5a4] | 327 | |
---|
| 328 | This operation performs an average between two Q-values centered on (0,0), |
---|
| 329 | and averaged over a specified number of pixels. |
---|
[78f02c3] | 330 | |
---|
[3fd3d5a4] | 331 | The data is returned as a function of angle (|phi|\) in degrees with zero |
---|
| 332 | degrees at the 3 O'clock position. |
---|
[78f02c3] | 333 | |
---|
[0cdf1af] | 334 | Box sum |
---|
| 335 | ^^^^^^^ |
---|
[78f02c3] | 336 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 341 | |
---|
[23a9beb] | 342 | Box Averaging in Qx |
---|
[0cdf1af] | 343 | ^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 344 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 351 | |
---|
[23a9beb] | 352 | Box Averaging in Qy |
---|
[0cdf1af] | 353 | ^^^^^^^^^^^^^^^^^^^ |
---|
[78f02c3] | 354 | |
---|
[3fd3d5a4] | 355 | This operation computes an average I(Qy) for the region of interest. |
---|
[23a9beb] | 356 | |
---|
[3fd3d5a4] | 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. |
---|
[78f02c3] | 361 | |
---|
[3fd3d5a4] | 362 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
[78f02c3] | 363 | |
---|
[a9dc4eb] | 364 | .. note:: This help document was last changed by Steve King, 01May2015 |
---|