[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 | |
---|
[37bbd5f] | 6 | Plotting Data/Models |
---|
| 7 | ==================== |
---|
| 8 | |
---|
[23a9beb] | 9 | Graph_Menu_ |
---|
| 10 | |
---|
| 11 | 2D_Data_Averaging_ |
---|
| 12 | |
---|
[98b30b4] | 13 | Key_Sequences_ |
---|
[78f02c3] | 14 | |
---|
| 15 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 16 | |
---|
[23a9beb] | 17 | .. _Graph_Menu: |
---|
[78f02c3] | 18 | |
---|
| 19 | Graph Menu |
---|
| 20 | ---------- |
---|
| 21 | |
---|
[98b30b4] | 22 | Invoking_the_Graph_Menu_ |
---|
[23a9beb] | 23 | |
---|
| 24 | Reset_Graph_ |
---|
| 25 | |
---|
| 26 | Hide_Show_Delete_Graph_ |
---|
| 27 | |
---|
| 28 | Data_Info_ |
---|
| 29 | |
---|
| 30 | Save_Plot_Image_ |
---|
| 31 | |
---|
| 32 | Save_Data_ |
---|
| 33 | |
---|
| 34 | Drag_Plot_ |
---|
| 35 | |
---|
| 36 | Zoom_In_Out_ |
---|
| 37 | |
---|
[98b30b4] | 38 | Remove_Data_from_Plot_ |
---|
[23a9beb] | 39 | |
---|
| 40 | Change_Scale_ |
---|
| 41 | |
---|
| 42 | Linear_Fit_ |
---|
| 43 | |
---|
| 44 | Other_Graph_Modifications_ |
---|
| 45 | |
---|
[98b30b4] | 46 | .. _Invoking_the_Graph_Menu: |
---|
[23a9beb] | 47 | |
---|
| 48 | Introduction |
---|
| 49 | ------------ |
---|
[78f02c3] | 50 | |
---|
| 51 | Locating the pointer and right-clicking on a data/theory plot will bring a |
---|
| 52 | context menu. On the menu, select a menu item. |
---|
| 53 | |
---|
[23a9beb] | 54 | .. _Reset_Graph: |
---|
| 55 | |
---|
| 56 | Reset Graph |
---|
| 57 | ----------- |
---|
[78f02c3] | 58 | |
---|
| 59 | To reset the graph's axis range, right click on the plot and the context menu |
---|
| 60 | pops-up. Select *Reset Graph* and the plot will take its initial range. Also |
---|
| 61 | the 'home' icon in tool bar will do the same. |
---|
| 62 | |
---|
[23a9beb] | 63 | .. _Hide_Show_Delete_Graph: |
---|
| 64 | |
---|
| 65 | Hide/Show/Delete Graph |
---|
| 66 | ---------------------- |
---|
[78f02c3] | 67 | |
---|
| 68 | To Hide, click the Hide (bar) button in the tool bar.To Show, select the the |
---|
| 69 | 'Show' menu item in the 'Graph' menu in the menu bar.To Delete, click the 'x' |
---|
| 70 | button in the title bar. |
---|
| 71 | |
---|
| 72 | Note: If a residuals graph (in Fitting) is hidden, it will not show up after |
---|
| 73 | computation. |
---|
| 74 | |
---|
[23a9beb] | 75 | .. _Data_Info: |
---|
| 76 | |
---|
| 77 | Data Info |
---|
| 78 | --------- |
---|
| 79 | |
---|
| 80 | From the context menu, select 'Data Info' to see the data information dialog |
---|
| 81 | panel. |
---|
| 82 | |
---|
| 83 | .. _Save_Plot_Image: |
---|
| 84 | |
---|
| 85 | Save Plot Image |
---|
| 86 | --------------- |
---|
[78f02c3] | 87 | |
---|
| 88 | Right click on plot. Context menu will pop-up select save image [file name]. |
---|
| 89 | A dialog window opens and write a the name of the file to save and click on |
---|
| 90 | *Save Image.* |
---|
| 91 | |
---|
[23a9beb] | 92 | .. _Save_Data: |
---|
[78f02c3] | 93 | |
---|
[23a9beb] | 94 | Save Data |
---|
| 95 | --------- |
---|
[78f02c3] | 96 | |
---|
| 97 | From the context menu, select 'Save points as a file' for 1D, or 'Save as a |
---|
| 98 | file(DAT)' for 2D. Note that two formats, txt and xml, are available in 1D |
---|
| 99 | saving. |
---|
| 100 | |
---|
[23a9beb] | 101 | .. _Drag_Plot: |
---|
| 102 | |
---|
| 103 | Drag Plot |
---|
| 104 | --------- |
---|
[78f02c3] | 105 | |
---|
| 106 | Select the *crossed arrows* button on the plot panel *toolbar* to drag the |
---|
| 107 | plot. To disable dragging mode, unselect the same button on the toolbar. |
---|
| 108 | |
---|
[23a9beb] | 109 | .. _Zoom_In_Out: |
---|
[78f02c3] | 110 | |
---|
[23a9beb] | 111 | Zoom In/Out |
---|
| 112 | ----------- |
---|
[78f02c3] | 113 | |
---|
[23a9beb] | 114 | Select the *rectangle* button on the plot panel *toolbar* to zoom in a |
---|
[78f02c3] | 115 | region of the plot. |
---|
| 116 | |
---|
[23a9beb] | 117 | To disable zoom mode, unselect the same button on the toolbar. After zoom in |
---|
| 118 | a region, select *left arrow* or *right arrow* button on the toolbar to set |
---|
| 119 | the graph the the previous size. If a mouse wheel button is available, |
---|
[98b30b4] | 120 | *zoom in/out* by scrolling the mouse wheel (see Key_Sequences_ help for |
---|
[78f02c3] | 121 | details). |
---|
| 122 | |
---|
[98b30b4] | 123 | .. _Remove_Data_from_Plot: |
---|
[23a9beb] | 124 | |
---|
| 125 | Remove Data from Plot |
---|
| 126 | --------------------- |
---|
| 127 | |
---|
| 128 | Highlight the plot and the context menu appears.Select *remove [file name]*. |
---|
| 129 | The plot selected will disappear. |
---|
| 130 | |
---|
| 131 | .. _Change_Scale: |
---|
| 132 | |
---|
| 133 | Change Scale |
---|
| 134 | ------------ |
---|
[78f02c3] | 135 | |
---|
| 136 | If the loaded data is a 1-D data changing scale or data representation will |
---|
| 137 | work as follows. *Right click* on the plot window. A context menu pops-up and |
---|
| 138 | select *Change Scale* . A dialog window titled *select the scale of the graph* |
---|
[23a9beb] | 139 | will pop-up then change the *x* , the *y* and the *view* values as wish. |
---|
| 140 | |
---|
[78f02c3] | 141 | The 'view' option includes the axis scale short-cuts such as Linear, Guinier, |
---|
| 142 | Cross-sectional (XC) Guinier, and Porod plot scale. For a proper data set, |
---|
| 143 | these axis scales can be used to estimate Rg, Rod diameter, or Background of |
---|
| 144 | neutron scattering data respectively (via 'Linear Fit'; see below). For a 2D |
---|
| 145 | image, *Right click* on the image to pop-up the context menu. Select to |
---|
| 146 | switch from linear to log scale. The scale selected is printed on the status |
---|
| 147 | bar. |
---|
| 148 | |
---|
[23a9beb] | 149 | If the loaded data is an image. *Right click* on the image to pop-up the |
---|
| 150 | context menu. Select to switch from linear to log scale. The scale selected is |
---|
| 151 | printed on the status bar. |
---|
[78f02c3] | 152 | |
---|
[23a9beb] | 153 | .. _Linear_Fit: |
---|
[78f02c3] | 154 | |
---|
[23a9beb] | 155 | Linear Fit |
---|
| 156 | ---------- |
---|
[78f02c3] | 157 | |
---|
[23a9beb] | 158 | Linear fit is to perform a line model fitting keeping the scale of the plot. |
---|
| 159 | Highlight data to fit. From the context menu select *Linear Fit* . A dialog |
---|
| 160 | window appears. Change model initial parameters, data limits and hit *fit* |
---|
| 161 | button. New parameters values are displayed and the line with the new |
---|
| 162 | parameters is added to the plot. Especially for Guinier, XC Guinier, and |
---|
| 163 | Porod plot scale, this 'Linear Fit' will provides Rg, Rod diameter, and |
---|
| 164 | background, respectively. The following figure shows an example for the |
---|
| 165 | Guinier scale. |
---|
[78f02c3] | 166 | |
---|
| 167 | .. image:: guinier_fit.png |
---|
| 168 | |
---|
[23a9beb] | 169 | .. _Other_Graph_Modifications: |
---|
| 170 | |
---|
| 171 | Other Graph Modifications |
---|
| 172 | ------------------------- |
---|
[78f02c3] | 173 | |
---|
| 174 | Some custom modifications of the symbols, text, axis, etc of the graph are |
---|
[23a9beb] | 175 | provided. |
---|
[78f02c3] | 176 | |
---|
| 177 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 178 | |
---|
[23a9beb] | 179 | .. _2D_Data_Averaging: |
---|
[78f02c3] | 180 | |
---|
| 181 | 2D Data Averaging |
---|
| 182 | ----------------- |
---|
| 183 | |
---|
[98b30b4] | 184 | Principle_ |
---|
[23a9beb] | 185 | |
---|
| 186 | How_to_Average_ |
---|
| 187 | |
---|
| 188 | Available_Averagings_ |
---|
| 189 | |
---|
| 190 | Unmasked_Circular_Average_ |
---|
| 191 | |
---|
| 192 | Masked_Circular_Average_ |
---|
| 193 | |
---|
| 194 | Sector_Average_ |
---|
| 195 | |
---|
| 196 | Annular_Average_ |
---|
| 197 | |
---|
| 198 | Box_Sum_ |
---|
| 199 | |
---|
| 200 | Box_Averaging_in_Qx_ |
---|
| 201 | |
---|
| 202 | Box_Averaging_in_Qy_ |
---|
[78f02c3] | 203 | |
---|
| 204 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 205 | |
---|
[98b30b4] | 206 | .. Principle: |
---|
[78f02c3] | 207 | |
---|
[98b30b4] | 208 | Principle |
---|
| 209 | --------- |
---|
[23a9beb] | 210 | |
---|
[78f02c3] | 211 | This feature allows you to perform different types of averages on your data, |
---|
| 212 | and allows you to see what regions of the detector will contribute to the |
---|
| 213 | average. The region to be averaged will be drown and can be modified by |
---|
| 214 | dragging the lines around. |
---|
| 215 | |
---|
[23a9beb] | 216 | .. _How_to_Average: |
---|
| 217 | |
---|
| 218 | How to Average |
---|
| 219 | -------------- |
---|
[78f02c3] | 220 | |
---|
| 221 | Right click on 2D data for the context menu to appear. Select one type of |
---|
| 222 | averages among *"sector [Q view]", "Annulus [Phi view]", "Box sum", "Box |
---|
| 223 | averaging in Qx ", "box averaging on Qy","Perform circular Average".* |
---|
| 224 | |
---|
| 225 | A slicer will appear except for *"Perform circular Average"* that you can |
---|
| 226 | drag by clicking on a slicer 's marker. When the marker is highlighted in red, |
---|
| 227 | it means that the slicer can change size.You can also move some of the slicer |
---|
| 228 | by simply drag its side when highlighted in red. the slicer size will be reset |
---|
| 229 | to its previous size if the user try to select a region greater than the size |
---|
| 230 | of the data. |
---|
| 231 | |
---|
| 232 | The user can also select a region to average when a slicer has been selected |
---|
| 233 | already by *right clicking* on the context menu and selecting *Edit Slicer |
---|
| 234 | Parameters* . The dialog window will appears and the user can enter values to |
---|
| 235 | selected a region or selected numbers of points to plot *nbins* . |
---|
| 236 | |
---|
| 237 | For *Box sum* , when the user selects this option, a new panel is created |
---|
| 238 | containing the result of average of the sum of every pixels contains on that |
---|
| 239 | data.The user can also enter values to select a region. |
---|
| 240 | |
---|
[23a9beb] | 241 | .. _Available_Averagings: |
---|
| 242 | |
---|
| 243 | Available Averagings |
---|
| 244 | -------------------- |
---|
[78f02c3] | 245 | |
---|
[23a9beb] | 246 | Some different types of averaging are provided for. |
---|
[78f02c3] | 247 | |
---|
[23a9beb] | 248 | .. _Unmasked_Circular_Average: |
---|
[78f02c3] | 249 | |
---|
[23a9beb] | 250 | Unmasked Circular Average |
---|
| 251 | ------------------------- |
---|
| 252 | |
---|
| 253 | This operation will perform and average in constant q-rings around the (x,y) pixel |
---|
[78f02c3] | 254 | location of the beam center. |
---|
| 255 | |
---|
[23a9beb] | 256 | .. _Masked_Circular_Average: |
---|
| 257 | |
---|
| 258 | Masked Circular Average |
---|
| 259 | ----------------------- |
---|
[78f02c3] | 260 | |
---|
[23a9beb] | 261 | This operation is same as 'Masked Circular Average' except that the masked |
---|
[78f02c3] | 262 | region is excluded if masked. |
---|
| 263 | |
---|
[23a9beb] | 264 | .. _Sector_Average: |
---|
| 265 | |
---|
| 266 | Sector Average [Q View] |
---|
| 267 | ----------------------- |
---|
| 268 | |
---|
| 269 | This operation averages in constant q-arcs. The width of the sector is specified in |
---|
| 270 | degrees (+/- delta phi) each side of the central angle (phi). |
---|
[78f02c3] | 271 | |
---|
[23a9beb] | 272 | .. _Annular_Average: |
---|
[78f02c3] | 273 | |
---|
[23a9beb] | 274 | Annular Average [Phi View] |
---|
| 275 | -------------------------- |
---|
[78f02c3] | 276 | |
---|
| 277 | It performs an average between two q-values centered in (0,0), and averaged |
---|
| 278 | over a width of a specified number of pixels. The data is returned as a |
---|
| 279 | function of angle (phi) in degrees. Moving one circle of this slicer to |
---|
| 280 | radius of zero corresponding to a circular averaging on radius qmax , the |
---|
| 281 | outer circle. The angle zero starts from the positive x-axis direction. |
---|
| 282 | |
---|
[23a9beb] | 283 | .. _Box_Sum: |
---|
| 284 | |
---|
| 285 | Box Sum |
---|
| 286 | ------- |
---|
[78f02c3] | 287 | |
---|
| 288 | Perform the sum of counts in a 2D region of interest.When editing the slicer, |
---|
| 289 | the user can enter the length and the width the rectangle slicer and the |
---|
| 290 | coordinates of the center of this rectangle. |
---|
| 291 | |
---|
[23a9beb] | 292 | .. _Box_Averaging_in_Qx: |
---|
| 293 | |
---|
| 294 | Box Averaging in Qx |
---|
| 295 | ------------------- |
---|
[78f02c3] | 296 | |
---|
| 297 | Computes average I(Qx) for a region of interest. When editing the slicer, the |
---|
| 298 | user can control the length and the width the rectangle slicer. The averaged |
---|
| 299 | output is calculated from the constant bins with rectangular shape. The |
---|
| 300 | resultant q values are nominal values, i.e., the central values of each bins |
---|
| 301 | on the x-axis. |
---|
| 302 | |
---|
[23a9beb] | 303 | .. _Box_Averaging_in_Qy: |
---|
| 304 | |
---|
| 305 | Box Averaging in Qy |
---|
| 306 | ------------------- |
---|
[78f02c3] | 307 | |
---|
| 308 | Computes average I(Qy) for a region of interest.When editing the slicer, the |
---|
| 309 | user can control the length and the width the rectangle slicer. The averaged |
---|
| 310 | output is calculated from the constant bins with rectangular shape. The |
---|
| 311 | resultant q values are nominal values, i.e., the central values of each bins |
---|
| 312 | on the y-axis. |
---|
| 313 | |
---|
| 314 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 315 | |
---|
[98b30b4] | 316 | .. _Key_Sequences: |
---|
[78f02c3] | 317 | |
---|
[98b30b4] | 318 | Key Sequences |
---|
| 319 | ------------- |
---|
[78f02c3] | 320 | |
---|
[23a9beb] | 321 | Floating_Panel_ |
---|
| 322 | |
---|
[98b30b4] | 323 | Context_Menu_ |
---|
[23a9beb] | 324 | |
---|
| 325 | Zoom_ |
---|
[78f02c3] | 326 | |
---|
| 327 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 328 | |
---|
[23a9beb] | 329 | .. _Floating_Panel: |
---|
| 330 | |
---|
| 331 | Floating Panel |
---|
| 332 | -------------- |
---|
[78f02c3] | 333 | |
---|
| 334 | For a graph panel to float on the top of the SV window: |
---|
| 335 | |
---|
| 336 | Press the *Ctrl(Cmd on MAC) key* on dragging and placing a panel. Or if you |
---|
| 337 | want to make all plot panels float, select 'Float' from Graph/Preperences in |
---|
| 338 | the menu bar. Otherwise choose 'Dock'. |
---|
| 339 | |
---|
[98b30b4] | 340 | .. _Context_Menu: |
---|
[23a9beb] | 341 | |
---|
| 342 | Graph Context Menu |
---|
| 343 | ------------------ |
---|
[78f02c3] | 344 | |
---|
| 345 | To get the graph context menu to print, copy, save data, (2D)average, etc, |
---|
| 346 | *locate the mouse point on the plot to highlight and *(Mouse) Right Click* |
---|
| 347 | to bring up the full menu. |
---|
| 348 | |
---|
[23a9beb] | 349 | .. _Zoom: |
---|
| 350 | |
---|
| 351 | Zoom In/Out |
---|
| 352 | ----------- |
---|
[78f02c3] | 353 | |
---|
| 354 | To Zoom in or out the full plot, *locate the mouse point inside the graph |
---|
| 355 | which will be the center of the zooming, then *rotate MouseWheel*. |
---|
| 356 | |
---|
| 357 | *To Zoom in or out the plot in x or y direction, *locate (and click) the |
---|
| 358 | mouse point near x (or y) axis just outside of the graph and then *rotate |
---|
| 359 | MouseWheel* .* Note that this works only on the 1D plots. |
---|