Changeset f67ed10 in sasview for sanscalculator/src/sans/calculator


Ignore:
Timestamp:
Aug 18, 2011 7: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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.