Changeset f67ed10 in sasview


Ignore:
Timestamp:
Aug 18, 2011 5:02:23 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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
Message:

updated help doc and wave pulse shapes(TOF)

Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/media/resolution_calculator_help.html

    r9e2af9a rf67ed10  
    33<h4>SANS Q Resolution Estimator</h4> 
    44<ul> 
    5 <li><a href="#Description">Description:</a></li> 
     5<li><a href="#Description">Description</a></li> 
    66<li><a href="#HowTo">HowTo?</a></li> 
    7  
     7<li><a href="#Theory">Theory</a></li> 
    88</ul> 
    99<h5><a name="Description">Description</a></h5> 
     
    1717<h5><a name="HowTo">HowTo?</a></h5> 
    1818<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.  
     191. Select the source and source type (Monochromatic or TOF).  
     20Note that the computational difference between the sources is  
     21only the gravitational contribution due to the mass.</p> 
     22<p> 
     232. Change the default values of the instrumental parameters as desired.</p> 
     24<p> 
     253. 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. 
     28Optionally, the input of the wavelength (NOT of the wavelength spread)  
     29could be extended by adding "; ##" where the ## is the number  
     30of the bins for the numerical integration. 
     31Otherwise, the default value "10" bins will be used.  
     32The same number of bins will be used for the corresponding wavelength spread in either cases.</li> 
    2233</p> 
     34<p>4. For TOF, the default wavelength spectrum is flat.  
     35The custom spectrum file (with 2 column text: wavelength(A) vs. intensity)  
     36can also be loaded by selecting "Add new" in the combobox.</p> 
    2337<p> 
    24 2. Select the coordinate system from the radio button. 
    25 </p> 
    26 <p> 
    27 3. Click on the compute button. 
     385. Once set all the input values, click the compute button.  
     39Depending on computation loads the calculation time will vary. 
    2840</p> 
    2941<p>  
    30 4. 1D and 2D dQ will be displayed in the text-box at the bottom of  
     426. 1D and 2D dQ will be displayed in the text-box at the bottom of  
    3143the panel. Two dimensional resolution weight distribution  
    3244(2D elliptical Gaussian function) will also be  
    3345displayed in the plot panel even if the Q inputs are outside  
    3446of the detector limit. 
    35 The red lines indicate the limits of the detector.  
     47The red lines indicate the limits of the detector (if a green lines appear (for TOF),  
     48it indicates the limits of the maximum q range for the largest wavelength  
     49due to the size of the detector). 
     50The summary can be accessed by clicking the 'light-bulb' icon  
     51at the bottom of the SansView main window. 
    3652</p> 
    3753<p><img src="resolution_tutor.gif"> 
     54</p> 
     55<h5><a name="Theory">Theory</a></h5> 
     56<p> 
     57The 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> 
     65In summary, the geometric and gravitational contributions depending on the shape of each factors can be expressed   
     66as shown the table.</p> 
     67<p> 
     68<img src="sigma_table.gif"> 
     69</p> 
     70<p> 
     71Finally, we use a Gaussian function to describe the 2D weighting distribution of the uncertainty in q. 
    3872</p> 
    3973</body> 
  • sanscalculator/src/sans/calculator/resolution_calculator.py

    r0b127025 rf67ed10  
    228228        lamb_spread = wavelength_spread 
    229229        # the shape of wavelength distribution 
     230        print "tof", tof 
    230231        if tof: 
    231232            # rectangular 
     
    283284        sigma_1 += self.get_variance(rthree, l_two, phi, comp1) 
    284285        # 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) 
    287288        # for wavelength spread 
    288289        # 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) 
    291292        # for 1d 
    292         variance_1d_1 = sigma_1/2 + sigma_wave_1 / tof_factor 
     293        variance_1d_1 = sigma_1/2 + sigma_wave_1  
    293294        # normalize 
    294295        variance_1d_1 = knot * knot * variance_1d_1 / 12 
     
    310311 
    311312        # 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) 
    314315 
    315316         
    316317        # for wavelength spread 
    317318        # 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) 
    320321        # for 1d 
    321         variance_1d_2 = sigma_2 / 2 + sigma_wave_2 / tof_factor 
     322        variance_1d_2 = sigma_2 / 2 + sigma_wave_2  
    322323        # normalize 
    323324        variance_1d_2 = knot*knot*variance_1d_2 / 12 
Note: See TracChangeset for help on using the changeset viewer.