Changeset 632e2e8 in sasview for src/sas/sascalc/data_util/qsmearing.py
- Timestamp:
- Nov 20, 2016 7:54:54 AM (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:
- 1cad8a4
- Parents:
- a5b8253 (diff), 4466a6a (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
ra5b8253 r632e2e8 14 14 import sys 15 15 from sasmodels import sesans 16 17 16 import numpy as np # type: ignore 18 17 from numpy import pi, exp # type: ignore 19 #from scipy.special import jv as besselj20 18 21 from sasmodels.resolution import Slit1D, Pinhole1D, SESANS1D 19 from sasmodels.resolution import Slit1D, Pinhole1D 20 from sasmodels.sesans import SESANS1D 22 21 from sasmodels.resolution2d import Pinhole2D 23 22 from src.sas.sascalc.data_util.nxsunit import Converter … … 60 59 # TODO: change other sanity checks to check for file loader instead of data structure? 61 60 _found_sesans = False 62 if data.dx is not None and data.meta_data['loader']=='SESANS': 61 #if data.dx is not None and data.meta_data['loader']=='SESANS': 62 if data.dx is not None and data.isSesans: 63 63 if data.dx[0] > 0.0: 64 64 _found_sesans = True … … 66 66 if _found_sesans == True: 67 67 #Pre-compute the Hankel matrix (H) 68 H0,H, q_calc = sesans.Hankelconstructor(data) 68 qmax, qunits = data.sample.zacceptance 69 hankel=sesans.SesansTransform() 70 sesans.SesansTransform.set_transform(hankel, 71 SE = Converter(data._xunit)(data.x, "A"), 72 zaccept = Converter(qunits)(qmax, "1/A"), 73 Rmax = 1000000) 69 74 # Then return the actual transform, as if it were a smearing function 70 return PySmear(SESANS1D(data, H0, H, q_calc), model)75 return PySmear(SESANS1D(data, hankel._H0, hankel._H, hankel.q), model) 71 76 72 77 _found_resolution = False
Note: See TracChangeset
for help on using the changeset viewer.