Changeset e68c9bf in sasview
- Timestamp:
- Aug 17, 2016 7:19:57 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 1cecc91
- Parents:
- e4c897b
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (08/17/16 07:19:02)
- git-committer:
- Lewis O'Driscoll <lewis.o'driscoll@…> (08/17/16 07:19:57)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasview/sasview.py
r1be5202 re68c9bf 81 81 #Always use private .matplotlib setup to avoid conflicts with other 82 82 #uses of matplotlib 83 #Have to check if .sasview exists first 83 #Have to check if .sasview exists first 84 84 sasdir = os.path.join(os.path.expanduser("~"),'.sasview') 85 85 if not os.path.exists(sasdir): … … 98 98 PLUGIN_MODEL_DIR = 'plugin_models' 99 99 APP_NAME = 'SasView' 100 101 from matplotlib import backend_bases 102 backend_bases._default_filetypes.pop('pgf', None) 100 103 101 104 class SasView(): … … 119 122 # Fitting perspective 120 123 try: 121 import sas.sasgui.perspectives.fitting as module 124 import sas.sasgui.perspectives.fitting as module 122 125 fitting_plug = module.Plugin() 123 126 self.gui.add_perspective(fitting_plug) … … 145 148 logging.error(traceback.format_exc()) 146 149 147 #Calculator perspective 150 #Calculator perspective 148 151 try: 149 152 import sas.sasgui.perspectives.calculator as module … … 191 194 if __name__ == "__main__": 192 195 run() 193 -
src/sas/sasgui/guiframe/media/graph_help.rst
r318427a9 re68c9bf 20 20 ^^^^^^^^^^^^^^^^^^^^^^^ 21 21 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. 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. 24 24 Then select a menu item. 25 25 … … 27 27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 28 28 29 To expand a plot window, click the *Maximise* (square) icon in the top-right 29 To expand a plot window, click the *Maximise* (square) icon in the top-right 30 30 corner. 31 31 32 To shrink a plot window, click the *Restore down* (square-on-square) icon in 32 To shrink a plot window, click the *Restore down* (square-on-square) icon in 33 33 the top-right corner. 34 34 35 To hide a plot, click the *Minimise* (-) icon in the top-right corner of the 35 To hide a plot, click the *Minimise* (-) icon in the top-right corner of the 36 36 plot window. 37 37 38 To show a hidden plot, select the *Restore up* (square-on-square) icon on the 38 To show a hidden plot, select the *Restore up* (square-on-square) icon on the 39 39 minimised window. 40 40 41 To delete a plot, click the *Close* (x) icon in the top-right corner of the 41 To delete a plot, click the *Close* (x) icon in the top-right corner of the 42 42 plot window. 43 43 44 *NOTE! If a residuals graph (when fitting data) is hidden, it will not show up 44 *NOTE! If a residuals graph (when fitting data) is hidden, it will not show up 45 45 after computation.* 46 46 … … 48 48 ^^^^^^^^^^^^^^^ 49 49 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 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 53 53 accordingly. 54 54 55 55 To disable dragging mode, unselect the *crossed arrows* icon on the toolbar. 56 56 … … 58 58 ^^^^^^^^^^^^^^^^^^^^^^^^ 59 59 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 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 63 63 a region of interest. Release the mouse button to generate the new view. 64 64 65 65 To disable zoom mode, unselect the *Zoom* button on the toolbar. 66 66 67 After zooming in on a a region, the *left arrow* or *right arrow* buttons on 67 After zooming in on a a region, the *left arrow* or *right arrow* buttons on 68 68 the toolbar will switch between recent views. 69 69 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 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 72 72 on one axis and scroll the wheel to zoom in/out on just that axis.* 73 73 74 To return to the original view of the data, click the the *Reset* (home) icon 74 To return to the original view of the data, click the the *Reset* (home) icon 75 75 in the toolbar at the bottom of the plot (see Resetting_the_graph_ for further details). 76 76 … … 78 78 ^^^^^^^^^^^^^^^^^^^ 79 79 80 To save the current plot as an image file, right click on the plot to bring up 80 To save the current plot as an image file, right click on the plot to bring up 81 81 the *Graph Menu* (see Invoking_the_graph_menu_) and select *Save Image*. 82 Alternatively, click on the *Save* (floppy disk) icon in the toolbar at the 82 Alternatively, click on the *Save* (floppy disk) icon in the toolbar at the 83 83 bottom of the plot. 84 85 A dialog window will open. Select a folder, enter a filename, choose an output 84 85 A dialog window will open. Select a folder, enter a filename, choose an output 86 86 image type, and click *Save*. 87 87 … … 98 98 * TIF/TIFF (tagged iamge file) 99 99 100 The PGF image type option requires a LaTeX compiler: xelatex (default),101 lualatex, or pdflatex. These are not shipped with SasView.102 103 100 Printing a plot 104 101 ^^^^^^^^^^^^^^^ 105 102 106 To send the current plot to a printer, click on the *Print* (printer) icon in 103 To send the current plot to a printer, click on the *Print* (printer) icon in 107 104 the toolbar at the bottom of the plot. 108 105 … … 112 109 ^^^^^^^^^^^^^^^^^^^ 113 110 114 To reset the axis range of a graph to its initial values select *Reset Graph 111 To reset the axis range of a graph to its initial values select *Reset Graph 115 112 Range* on the *Graph Menu* (see Invoking_the_graph_menu_). Alternatively, use 116 113 the *Reset* (home) icon in the toolbar at the bottom of the plot. … … 136 133 137 134 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 135 dialog window will appear in which it is possible to choose different 139 136 transformations of the x (usually Q) or y (usually I(Q)) axes, including: 140 137 … … 142 139 * y, 1/y, ln(y), y^2, y.(x^4), 1/sqrt(y), 143 140 * log10(y), ln(y.x), ln(y.x^2), ln(y.x^4), log10(y.x^4) 144 141 145 142 A *View* option includes short-cuts to common SAS transformations, such as: 146 143 … … 151 148 * Kratky 152 149 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 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 155 152 levels, via a linear fit (see Making_a_linear_fit_). 156 153 … … 161 158 162 159 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 160 Scale* to switch between a linear to log intensity scale. The type of scale 164 161 selected is written alongside the colour scale. 165 162 … … 170 167 171 168 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 169 choose a different color scale for the image and/or change the maximum or 173 170 minimum limits of the scale. 174 171 … … 176 173 ^^^^^^^^^^^^^^^^^^^^^^^^ 177 174 178 Clicking anywhere in the plot window will cause the current coordinates to be 175 Clicking anywhere in the plot window will cause the current coordinates to be 179 176 displayed in the status bar at the very bottom-left of the SasView window. 180 177 181 178 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 182 179 … … 196 193 197 194 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 195 and select *DataInfo* to bring up a data information dialog panel for that 199 196 data set. 200 197 … … 203 200 204 201 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 202 a File* (if 1D data) or *Save as a file(DAT)* (if 2D data). A save dialog will 206 203 appear. 207 204 208 1D data can be saved in either ASCII text (.TXT) or CanSAS/SASXML (.XML) 205 1D data can be saved in either ASCII text (.TXT) or CanSAS/SASXML (.XML) 209 206 formats (see :ref:`Formats`). 210 207 … … 219 216 220 217 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. 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. 224 221 225 222 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 223 Porod type analyses, for example, to estimate Rg, a rod diameter, or incoherent 227 224 background level, respectively. 228 225 … … 243 240 244 241 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. 242 or *Hide Error Bar* to switch between showing/hiding the errors associated 243 with the chosen dataset. 247 244 248 245 Modify plot properties … … 250 247 251 248 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 249 Property* to change the size, color, or shape of the displayed marker for the 253 250 chosen dataset, or to change the dataset label that appears on the plot. 254 251 … … 263 260 This feature is only available with 2D data. 264 261 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 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 267 264 can be modified by dragging the boundaries around. 268 265 … … 280 277 * Box averaging on Qy 281 278 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 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 284 281 in red, it means that the slicer can move/change size. 285 282 286 *NOTE! The slicer size will reset if you try to select a region greater than 283 *NOTE! The slicer size will reset if you try to select a region greater than 287 284 the size of the data.* 288 285 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 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 292 289 define a region or select the number of points to plot (*nbins*). 293 290 294 A separate plot window will also have appeared, displaying the requested 291 A separate plot window will also have appeared, displaying the requested 295 292 average. 296 293 297 *NOTE! The displayed average only updates when input focus is moved back to 294 *NOTE! The displayed average only updates when input focus is moved back to 298 295 that window; ie, when the mouse pointer is moved onto that plot.* 299 296 300 Selecting *Box Sum* automatically brings up the 'Slicer Parameters' dialog in 297 Selecting *Box Sum* automatically brings up the 'Slicer Parameters' dialog in 301 298 order to display the average numerically, rather than graphically. 302 299 … … 306 303 ^^^^^^^^^^^^^^^^^^^^^^^^^ 307 304 308 This operation will perform an average in constant Q-rings around the (x,y) 305 This operation will perform an average in constant Q-rings around the (x,y) 309 306 pixel location of the beam center. 310 307 … … 312 309 ^^^^^^^^^^^^^^^^^^^^^^^ 313 310 314 This operation is the same as 'Unmasked Circular Average' except that any 311 This operation is the same as 'Unmasked Circular Average' except that any 315 312 masked region is excluded. 316 313 … … 320 317 This operation averages in constant Q-arcs. 321 318 322 The width of the sector is specified in degrees (+/- |delta|\|phi|\) each side 319 The width of the sector is specified in degrees (+/- |delta|\|phi|\) each side 323 320 of the central angle (|phi|\). 324 321 … … 326 323 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 327 324 328 This operation performs an average between two Q-values centered on (0,0), 325 This operation performs an average between two Q-values centered on (0,0), 329 326 and averaged over a specified number of pixels. 330 327 331 The data is returned as a function of angle (|phi|\) in degrees with zero 328 The data is returned as a function of angle (|phi|\) in degrees with zero 332 329 degrees at the 3 O'clock position. 333 330 … … 337 334 This operation performs a sum of counts in a 2D region of interest. 338 335 339 When editing the slicer parameters, the user can enter the length and the width 336 When editing the slicer parameters, the user can enter the length and the width 340 337 the rectangular slicer and the coordinates of the center of the rectangle. 341 338 … … 345 342 This operation computes an average I(Qx) for the region of interest. 346 343 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 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 350 347 is, the central value of each bin on the x-axis. 351 348 … … 355 352 This operation computes an average I(Qy) for the region of interest. 356 353 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 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 360 357 is, the central value of each bin on the x-axis. 361 358
Note: See TracChangeset
for help on using the changeset viewer.