Changeset 44c0746 in sasview
- Timestamp:
- Oct 5, 2016 7:05:24 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 87b9447
- Parents:
- b9c94fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/data_util/qsmearing.py
rf8aa738 r44c0746 5 5 #This software was developed by the University of Tennessee as part of the 6 6 #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 7 #project funded by the US National Science Foundation. 7 #project funded by the US National Science Foundation. 8 8 #See the license text in license.txt 9 9 #copyright 2008, University of Tennessee … … 16 16 from sasmodels.resolution import Slit1D, Pinhole1D 17 17 from sasmodels.resolution2d import Pinhole2D 18 from sasmodels import sesans 18 19 19 20 def smear_selection(data, model = None): … … 82 83 if _found_slit == True: 83 84 return slit_smear(data, model) 85 86 # Look for sesans 87 _found_sesans = False 88 if data.hasattr(lam): 89 _found_sesans = True 90 logging.info("Found SESANS data!!") 91 92 # If we found sesans data, do the necessary jiggery pokery 93 if _found_sesans == True: 94 return sesans_smear(data, model) 95 84 96 return None 97 98 def sesans_smear(data, model=None): 99 q = sesans.make_q(data.sample.zacceptance, data.Rmax) 100 index = slice(None, None) 101 res = None 102 if data.y is not None: 103 Iq, dIq = data.y, data.dy 104 else: 105 Iq, dIq = None, None 106 #self._theory = np.zeros_like(q) 107 q_vectors = [q] 108 q_mono = sesans.make_all_q(data) 109 Iq = model.evalDistribution(q_mono) 110 111 return sesans.transform(data, q, Iq, 0, 0) 85 112 86 113
Note: See TracChangeset
for help on using the changeset viewer.