Changeset 51a4d78 in sasview for src/sas/sascalc/data_util/qsmearing.py
- Timestamp:
- Oct 8, 2016 1:33:04 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:
- 1fac6c0
- Parents:
- 7988501 (diff), f7bc948 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/data_util/qsmearing.py
rf8aa738 rf7bc948 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 … … 13 13 import logging 14 14 import sys 15 import sasmodels.sesans 15 16 16 from sasmodels.resolution import Slit1D, Pinhole1D 17 from sasmodels.resolution import Slit1D, Pinhole1D, SESANS1D 17 18 from sasmodels.resolution2d import Pinhole2D 18 19 … … 48 49 49 50 # Look for resolution smearing data 51 _found_sesans = False 52 if data.dx is not None and data.lam is not None: 53 if data.dx[0] > 0.0: 54 _found_sesans = True 55 56 if _found_sesans == True: 57 return sesans_smear(data, model) 58 50 59 _found_resolution = False 51 60 if data.dx is not None and len(data.dx) == len(data.x): … … 142 151 width = data.dx if data.dx is not None else 0 143 152 return PySmear(Pinhole1D(q, width), model) 153 154 def sesans_smear(data, model=None): 155 #This should be calculated characteristic length scale 156 #Probably not a data prameter either 157 #Need function to calculate this based on model 158 #Here assume a number 159 Rmax = 50000 160 q_calc = sesans.make_q(data.sample.z, Rmax) 161 return PySmear(SESANS1D(data,q_calc),model)
Note: See TracChangeset
for help on using the changeset viewer.