Changeset f67ed10 in sasview
- Timestamp:
- Aug 18, 2011 7:02:23 PM (14 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:
- 83bf44e1
- Parents:
- b470477
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/media/resolution_calculator_help.html
r9e2af9a rf67ed10 3 3 <h4>SANS Q Resolution Estimator</h4> 4 4 <ul> 5 <li><a href="#Description">Description :</a></li>5 <li><a href="#Description">Description</a></li> 6 6 <li><a href="#HowTo">HowTo?</a></li> 7 7 <li><a href="#Theory">Theory</a></li> 8 8 </ul> 9 9 <h5><a name="Description">Description</a></h5> … … 17 17 <h5><a name="HowTo">HowTo?</a></h5> 18 18 <p> 19 1. Change the default values of the instrumental parameters as desired, 20 and type the qx and qy value where the resolution 21 is calculated. 19 1. Select the source and source type (Monochromatic or TOF). 20 Note that the computational difference between the sources is 21 only the gravitational contribution due to the mass.</p> 22 <p> 23 2. Change the default values of the instrumental parameters as desired.</p> 24 <p> 25 3. The input formats of wavelength and its spread (=FWHM/wavelength) depend on the source type. 26 <li>For monochromatic wave, the inputs are just one values as shown with the defaults.</li> 27 <li>For TOF, the min and max values should be separated by "-" to describe the wavelength band range. 28 Optionally, the input of the wavelength (NOT of the wavelength spread) 29 could be extended by adding "; ##" where the ## is the number 30 of the bins for the numerical integration. 31 Otherwise, the default value "10" bins will be used. 32 The same number of bins will be used for the corresponding wavelength spread in either cases.</li> 22 33 </p> 34 <p>4. For TOF, the default wavelength spectrum is flat. 35 The custom spectrum file (with 2 column text: wavelength(A) vs. intensity) 36 can also be loaded by selecting "Add new" in the combobox.</p> 23 37 <p> 24 2. Select the coordinate system from the radio button. 25 </p> 26 <p> 27 3. Click on the compute button. 38 5. Once set all the input values, click the compute button. 39 Depending on computation loads the calculation time will vary. 28 40 </p> 29 41 <p> 30 4. 1D and 2D dQ will be displayed in the text-box at the bottom of42 6. 1D and 2D dQ will be displayed in the text-box at the bottom of 31 43 the panel. Two dimensional resolution weight distribution 32 44 (2D elliptical Gaussian function) will also be 33 45 displayed in the plot panel even if the Q inputs are outside 34 46 of the detector limit. 35 The red lines indicate the limits of the detector. 47 The red lines indicate the limits of the detector (if a green lines appear (for TOF), 48 it indicates the limits of the maximum q range for the largest wavelength 49 due to the size of the detector). 50 The summary can be accessed by clicking the 'light-bulb' icon 51 at the bottom of the SansView main window. 36 52 </p> 37 53 <p><img src="resolution_tutor.gif"> 54 </p> 55 <h5><a name="Theory">Theory</a></h5> 56 <p> 57 The scattering wave transfer vector is by definition,</p> 58 <p> 59 <img src="q.gif" width="600" height="300"> 60 </p> 61 <p>In the limit of the small angle, the variance of q in the first order approximation is</p> 62 <p> 63 <img src="sigma_q.gif"> 64 </p> 65 In summary, the geometric and gravitational contributions depending on the shape of each factors can be expressed 66 as shown the table.</p> 67 <p> 68 <img src="sigma_table.gif"> 69 </p> 70 <p> 71 Finally, we use a Gaussian function to describe the 2D weighting distribution of the uncertainty in q. 38 72 </p> 39 73 </body> -
sanscalculator/src/sans/calculator/resolution_calculator.py
r0b127025 rf67ed10 228 228 lamb_spread = wavelength_spread 229 229 # the shape of wavelength distribution 230 print "tof", tof 230 231 if tof: 231 232 # rectangular … … 283 284 sigma_1 += self.get_variance(rthree, l_two, phi, comp1) 284 285 # for gravity term 285 sigma_1 += self.get_variance_gravity(l_ssa, l_sad, lamb, lamb_spread,286 phi, comp1, 'on') 286 sigma_1 += (self.get_variance_gravity(l_ssa, l_sad, lamb, lamb_spread, 287 phi, comp1, 'on') / tof_factor) 287 288 # for wavelength spread 288 289 # reserve for 1d calculation 289 sigma_wave_1 = self.get_variance_wave(radius, l_two, lamb_spread,290 phi, 'radial', 'on') 290 sigma_wave_1 = (self.get_variance_wave(radius, l_two, lamb_spread, 291 phi, 'radial', 'on') / tof_factor) 291 292 # for 1d 292 variance_1d_1 = sigma_1/2 + sigma_wave_1 / tof_factor293 variance_1d_1 = sigma_1/2 + sigma_wave_1 293 294 # normalize 294 295 variance_1d_1 = knot * knot * variance_1d_1 / 12 … … 310 311 311 312 # for gravity term 312 sigma_2 += self.get_variance_gravity(l_ssa, l_sad, lamb, lamb_spread,313 phi, comp2, 'on') 313 sigma_2 += (self.get_variance_gravity(l_ssa, l_sad, lamb, lamb_spread, 314 phi, comp2, 'on') / tof_factor) 314 315 315 316 316 317 # for wavelength spread 317 318 # reserve for 1d calculation 318 sigma_wave_2 = self.get_variance_wave(radius, l_two, lamb_spread,319 phi, 'phi', 'on') 319 sigma_wave_2 = (self.get_variance_wave(radius, l_two, lamb_spread, 320 phi, 'phi', 'on') / tof_factor) 320 321 # for 1d 321 variance_1d_2 = sigma_2 / 2 + sigma_wave_2 / tof_factor322 variance_1d_2 = sigma_2 / 2 + sigma_wave_2 322 323 # normalize 323 324 variance_1d_2 = knot*knot*variance_1d_2 / 12
Note: See TracChangeset
for help on using the changeset viewer.