Changeset a01af35 in sasview for src/sas/sascalc/data_util
- Timestamp:
- Nov 13, 2016 8:04:05 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:
- 55db501, a5b8253
- Parents:
- f5e226c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/data_util/qsmearing.py
rf5e226c9 ra01af35 18 18 import numpy as np # type: ignore 19 19 from numpy import pi, exp # type: ignore 20 from scipy.special import jvas besselj20 #from scipy.special import j as besselj 21 21 22 22 from sasmodels.resolution import Slit1D, Pinhole1D, SESANS1D … … 66 66 67 67 if _found_sesans == True: 68 #Pre-computing the Hankel matrix (H) 69 70 Rmax = 1000000 71 q_calc = sesans.make_q(data.sample.zacceptance, Rmax) 72 SElength = Converter(data._xunit)(data.x, "A") 73 dq = q_calc[1] - q_calc[0] 74 H0 = dq / (2 * pi) * q_calc 75 repSE, repq = np.meshgrid(SElength,q_calc) 76 hankelt=time.time() 77 H = dq / (2 * pi) * besselj(0, np.outer(q_calc, SElength))*repq 78 hankelt=time.time()-hankelt 79 print("Hankel transform took "+str(hankelt)+" s") 68 #Pre-compute the Hankel matrix (H) 69 H0,H, q_calc = sesans.Hankelconstructor(data) 70 # Then return the actual transform, as if it were a smearing function 80 71 return PySmear(SESANS1D(data, H0, H, q_calc), model) 81 72
Note: See TracChangeset
for help on using the changeset viewer.