source: sasview/src/sas/guiframe/media/graph_help.rst @ a6f3613

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since a6f3613 was a9dc4eb, checked in by smk78, 10 years ago

Sphinx formatting changes (sections → sections & subsections; many
'html'ised internal links removed as Sphinx will autogenerate navigation
links from the sectioning)

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