- Timestamp:
- Feb 19, 2015 8:08:50 AM (10 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:
- 4749514
- Parents:
- 27ab091 (diff), bc9a0e1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas
- Files:
-
- 1 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/calculator/media/data_operator_help.rst
r684fade rad4d8b4 34 34 available operators are: 35 35 36 * + (for addition)37 * - (for subtraction),38 * * (for multiplication)39 * / (for division)40 * | (for combination of two data sets)36 * \+ (for addition) 37 * \- (for subtraction) 38 * \* (for multiplication) 39 * \/ (for division) 40 * \| (for combination of two data sets) 41 41 42 42 If two data sets do not match, the operation will fail and the background -
src/sas/perspectives/calculator/media/density_calculator_help.rst
r054a3ad rcbae5a2 19 19 ------ 20 20 21 1) Enter the empirical formula of a molecule. For mixtures, the ratio of each 21 1) Select *Density/Volume Calculator* from the *Tool* menu on the SasView toolbar. 22 23 2) Enter the empirical formula of a molecule. For mixtures, the ratio of each 22 24 of the molecules should be used, for example, (H2O)0.5(D2O)0.5. 23 25 24 2) Use the input combo box to choose between molar volume or mass density and26 3) Use the input combo box to choose between molar volume or mass density and 25 27 then type in an input value. 26 28 27 3) Click the 'Calculate' button to perform the calculation.29 4) Click the 'Calculate' button to perform the calculation. 28 30 29 31 .. image:: density_tutor.gif -
src/sas/perspectives/calculator/media/image_viewer_help.rst
r920928f r1e01486 14 14 plot can also be resized by dragging the corner of the panel. 15 15 16 Supported image formats are png, bmp, gif, or jpg. (There is currently a bug in 17 the tif loader) 16 The supported input image formats are: 17 18 * BMP (bitmap format) 19 * GIF (graphical interchange format) 20 * JPG (joint photographic experts group format) 21 * PNG (portable network graphics format) 22 * TIF (tagged image format) 18 23 19 24 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 22 27 ------ 23 28 24 1 . Select 'Image Viewer' under the 'Tool' menu in the menubar.29 1) Select *Image Viewer* from the *Tool* menu on the SasView toolbar. 25 30 26 2. Select a file type from the drop-box at the bottom of the file dialog panel, 27 choose a file of interest, and then click the 'Open' button (see the 28 picture below). 31 2) Select a file and then click *Open*. 29 32 30 33 .. image:: load_image.bmp 31 34 32 3. If the loading is successful, the image will be displayed. The file name 33 will be shown in the title bar (see the picture below). 35 If the loading is successful the image will be displayed. 34 36 35 4. Some options such as saving, printing, and copying are available from the36 menubar, or in the context-menu (by right-clicking anywhere in the plot).37 3) To save, print, or copy the image, or to apply a grid overlay, right-click 38 anywhere in the plot. 37 39 38 40 .. image:: pic_plot.bmp 39 41 40 5. If the image is taken from a 2D detector, it can be converted into 2D data41 where the z values are computed as42 4. If the image is taken from a 2D detector, SasView can attempt to convert 43 the colour/grey scale into pseudo-intensity 2D data using 42 44 43 z = (0.299 x R) + (0.587 x G) + (0.114 x B)45 z = (0.299 x R) + (0.587 x G) + (0.114 x B) 44 46 45 unless the picture file is formatted as 8-bit grey-scale tif.47 unless the image is formatted as 8-bit grey-scale TIF. 46 48 47 In the "Convert to Data" dialog, set the parameters relevant to yourdata and48 then click the OK button.49 5. In the *Convert to Data* dialog, set the parameters relevant to the data and 50 then click the OK. 49 51 50 52 .. image:: pic_convert.bmp 53 54 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 55 56 .. note:: This help document was last changed by Steve King, 18Feb2015 -
src/sas/perspectives/calculator/media/kiessig_calculator_help.rst
rec392464 r1e01486 3 3 .. This is a port of the original SasView html help file to ReSTructured text 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 6 .. |pi| unicode:: U+03C0 7 .. |Ang| unicode:: U+212B 5 8 6 9 Kiessig Thickness Calculator Tool … … 10 13 ----------- 11 14 12 This tool is to approximately estimate the thickness of a layer or the13 diameter of particles from the Kiessig fringe in SAS/NR data, and using the14 Kiessigrelation15 This tool is approximately estimates the thickness of a layer or the diameter 16 of particles from the position of the Kiessig fringe/Bragg peak in NR/SAS data 17 using the relation 15 18 16 thickness = 2*Pi/fringe_width. 19 (thickness *or* size) = 2 * |pi| / (fringe_width *or* peak position) 17 20 18 21 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 19 20 22 21 23 How To 22 24 ------ 23 25 24 To get a rough thickness or particle size, just type the Kiessig fringe width 25 (in units of 1/Angstrom) and click on the 'Compute' button. Then the output 26 value will be show up in the 'Thickness' text box. 26 To get a rough thickness or particle size, simply type the fringe or peak 27 position (in units of 1/|Ang|\) and click on the *Compute* button. 28 29 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 30 31 .. note:: This help document was last changed by Steve King, 18Feb2015 32 -
src/sas/perspectives/calculator/media/python_shell_help.rst
r920928f r77a9ddc 10 10 ----------- 11 11 12 This is a Python shell (PyCrust) provided with WxPython. An editing notebook 13 will show up when a Python file is loaded from the 'New' or 'Open' menu. 12 This is a Python shell/editor (PyCrust) provided with WxPython. An editing 13 notebook will show up when a Python file is created/loaded with the *New* or 14 *Open* options on the menu. 14 15 15 The 'Run' menu is added for the editor to be able to compile and run the Python 16 code. 16 *Run* enables the editor to compile and run the Python code. 17 17 18 For the details about the Python, visit the website 19 http://docs.python.org/tutorial/ 18 For the details about the Python, visit the website http://docs.python.org/tutorial/ 20 19 21 The numpy, scipy, matplotlib, etc, libraries are shipped with SasView. However,22 some functionalities of those packages may ormay not work.20 The NumPy, SciPy, and Matplotlib, etc, libraries are shipped with SasView. 21 However, some functionality may not work. 23 22 24 PyCrust includes its own Help menu in the shell window.23 PyCrust has its own Help. 25 24 26 Note: Help() and Credits() do not work on Macs. 25 *NOTE! Help() and Credits() do not work on Macs.* 27 26 28 27 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 31 30 ------- 32 31 33 An example from the matplotlibgallery:32 An example calling the Matplotlib plotting gallery: 34 33 35 .. image:: pycrust_example.bmp 34 .. image:: pycrust_example.png 35 36 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 37 38 .. note:: This help document was last changed by Steve King, 19Feb2015 -
src/sas/perspectives/calculator/media/resolution_calculator_help.rst
rec392464 rbc9a0e1 3 3 .. This is a port of the original SasView html help file to ReSTructured text 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 6 .. |pi| unicode:: U+03C0 7 .. |lambda| unicode:: U+03BB 8 .. |Ang| unicode:: U+212B 5 9 6 10 Q Resolution Estimator … … 10 14 ----------- 11 15 12 This tool is to approximately estimate the resolution of Q based on the SAS13 instrumental parameter values assuming that the detector is flat and vertical14 to the incident beam direction.16 This tool is approximately estimates the resolution of Q from SAS instrumental 17 parameter values assuming that the detector is flat and normal to the 18 incident beam. 15 19 16 20 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 19 23 ------ 20 24 21 1. Select the source and source type (Monochromatic or TOF). Note that the 22 computational difference between the sources is only the gravitational 23 contribution due to the mass. 25 1) Select *SAS Resolution Esimator* from the *Tool* menu on the SasView toolbar. 24 26 25 2 . Change the default values of the instrumental parameters as desired.27 2) Select the source (Neutron or Photon) and source type (Monochromatic or TOF). 26 28 27 3. The input formats of wavelength and its spread (=FWHM/wavelength) depend on 28 the source type.For monochromatic wave, the inputs are just one values as shown 29 with the defaults.For TOF, the min and max values should be separated by "-" 30 to describe the wavelength band range. Optionally, the input of the wavelength 31 (NOT of the wavelength spread) could be extended by adding "; --" where the -- 32 is the number of the bins for the numerical integration. Otherwise, the 33 default value "10" bins will be used. The same number of bins will be used 34 for the corresponding wavelength spread in either cases. 29 *NOTE! The computational difference between the sources is only the 30 gravitational contribution due to the mass of the particles.* 35 31 36 4. For TOF, the default wavelength spectrum is flat. The custom spectrum file 37 (with 2 column text: wavelength(A) vs. intensity) can also be loaded by 38 selecting "Add new" in the combobox. 32 3) Change the default values of the instrumental parameters as required. Be 33 careful to note that distances are specified in cm! 39 34 40 5. Once set all the input values, click the compute button. Depending on 41 computation loads the calculation time will vary. 35 4) Enter values for the source wavelength(s) and its spread (= FWHM / wavelength). 36 37 For monochromatic sources, the inputs are just one value. For TOF sources, 38 the minimum and maximum values should be separated by a '-' to specify a 39 range. 40 41 Optionally, the wavelength (BUT NOT of the wavelength spread) can be extended 42 by adding '; nn' where the 'nn' specifies the number of the bins for the 43 numerical integration. The default value is nn = 10. The same number of bins 44 will be used for the corresponding wavelength spread. 42 45 43 6. 1D and 2D dQ will be displayed in the text-box at the bottom of the panel. 44 Two dimensional resolution weight distribution (2D elliptical Gaussian 45 function) will also be displayed in the plot panel even if the Q inputs are 46 outside of the detector limit. The red lines indicate the limits of the 47 detector (if a green lines appear (for TOF), it indicates the limits of the 48 maximum q range for the largest wavelength due to the size of the detector). 49 Note that the effect from the beam block is ignored, so in the small q region 50 near the beam block 46 5) For TOF, the default wavelength spectrum is flat. A custom spectral 47 distribution file (2-column text: wavelength (|Ang|\) vs Intensity) can also 48 be loaded by selecting *Add new* in the combo box. 51 49 52 [ie., q<2*pi*(beam block diameter) / (sample to detector distance) / lamda_min] 50 6) When ready, click the *Compute* button. Depending on the computation the 51 calculation time will vary. 53 52 54 the variance is slightly under estimated. 53 7) 1D and 2D dQ values will be displayed at the bottom of the panel, and a 2D 54 resolution weight distribution (a 2D elliptical Gaussian function) will also 55 be displayed in the plot panel even if the Q inputs are outside of the 56 detector limit (the red lines indicate the limits of the detector). 57 58 TOF only: green lines indicate the limits of the maximum Q range accessible 59 for the longest wavelength due to the size of the detector. 60 61 Note that the effect from the beam block/stop is ignored, so in the small Q 62 region near the beam block/stop 55 63 56 7. The summary can be accessed by clicking the 'light-bulb' icon at the bottom 57 of the SasView main window. 64 [ie., Q < 2*|pi|\*(beam block diameter) / (sample-to-detector distance) / |lambda|\_min] 65 66 the variance is slightly under estimated. 67 68 8) A summary of the calculation is written to the SasView *Console* at the 69 bottom of the main SasView window. 58 70 59 71 .. image:: resolution_tutor.gif … … 68 80 .. image:: q.gif 69 81 70 In the limit of the small angle, the variance of q in the firstorder71 approximation is82 In the small-angle limit, the variance of Q is to a first-order 83 approximation 72 84 73 85 .. image:: sigma_q.gif 74 86 75 In summary, the geometric and gravitational contributions depending on the 76 shape of each factors can be expressed as shown the table. 87 The geometric and gravitational contributions can then be summarised as 77 88 78 89 .. image:: sigma_table.gif 79 90 80 Finally, we use a Gaussian functionto describe the 2D weighting distribution81 of the uncertainty in q.91 Finally, a Gaussian function is used to describe the 2D weighting distribution 92 of the uncertainty in Q. 82 93 83 94 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 85 96 References 86 97 ---------- 87 D.F.R. Mildner and J.M. Carpenter, J. Appl. Cryst. 17, 249-256 (1984)88 98 89 D.F.R. Mildner, J.M. Carpenter and D.L. Worcester, J. Appl. Cryst. 19, 311-319 90 (1986) 99 D.F.R. Mildner and J.M. Carpenter 100 *J. Appl. Cryst.* 17 (1984) 249-256 101 102 D.F.R. Mildner, J.M. Carpenter and D.L. Worcester 103 *J. Appl. Cryst.* 19 (1986) 311-319 104 105 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 106 107 .. note:: This help document was last changed by Steve King, 19Feb2015 -
src/sas/guiframe/local_perspectives/plotting/slicerpanel.py
r79492222 r27ab091 17 17 #TODO: show units 18 18 #TODO: order parameters properly 19 19 ## Internal name for the AUI manager 20 20 window_name = "Slicer panel" 21 21 ## Title to appear on top of the window … … 76 76 flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15) 77 77 else: 78 title = wx.StaticText(self, -1, "Slicer Parameters", 78 title_text = str(type) + "Parameters" 79 title = wx.StaticText(self, -1, title_text, 79 80 style=wx.ALIGN_LEFT) 80 81 self.bck.Add(title, (0, 0), (1, 2), … … 125 126 def onSetFocus(self, evt): 126 127 """ 127 High tlight the textcrtl128 Highlight the txtcrtl 128 129 """ 130 evt.Skip() 129 131 # Get a handle to the TextCtrl 130 132 widget = evt.GetEventObject() … … 147 149 """ 148 150 Parameters have changed 149 """ 151 """ 152 evt.Skip() 150 153 params = {} 151 154 has_error = False
Note: See TracChangeset
for help on using the changeset viewer.