source: sasview/src/sas/sasgui/guiframe/media/graph_help.rst @ 77d92cd

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.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 77d92cd was f93b473f, checked in by smk78, 9 years ago

Removed duplicate substitutions now we are using rst_prolog

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