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