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