Changeset d459d4e in sasmodels
- Timestamp:
- Mar 19, 2016 6:11:16 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c
- Parents:
- daa669b
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
example/sesansfit.py
rbfea0c2 rd459d4e 42 42 dy = err_data 43 43 sample = Sample() 44 needs_all_q= acceptance_angle is not None44 has_no_finite_acceptance = acceptance_angle is not None 45 45 data = SESANSData1D() 46 46 data.acceptance_angle = acceptance_angle 47 47 48 data. needs_all_q= acceptance_angle is not None48 data.has_no_finite_acceptance = acceptance_angle is not None 49 49 if "radius" in initial_vals: 50 50 radius = initial_vals.get("radius") -
sasmodels/sesans.py
ra06430c rd459d4e 1 1 """ 2 Conversion of scattering cross section from SANS in absolute 3 units into SESANS using a Hankel transformation 2 Conversion of scattering cross section from SANS (I(q), or rather, ds/dO) in absolute 3 units (cm-1)into SESANS correlation function G using a Hankel transformation, then converting 4 the SESANS correlation function into polarisation from the SESANS experiment 4 5 5 Everything is in units of metres except specified otherwise 6 Everything is in units of metres except specified otherwise (NOT TRUE!!!) 7 Everything is in conventional units (nm for spin echo length) 6 8 7 9 Wim Bouwman (w.g.bouwman@tudelft.nl), June 2013 … … 18 20 r""" 19 21 Return a $q$ vector suitable for SESANS covering from $2\pi/ (10 R_{\max})$ 20 to $q_max$. 22 to $q_max$. This is the integration range of the Hankel transform; bigger range and 23 more points makes a better numerical integration. 24 Smaller q_min will increase reliable spin echo length range. 25 Rmax is the "radius" of the largest expected object and can be set elsewhere. 26 q_max is determined by the acceptance angle of the SESANS instrument. 21 27 """ 22 28 q_min = dq = 0.1 * 2*pi / Rmax … … 24 30 25 31 def make_all_q(data): 26 if not data.needs_all_q: 32 """ 33 Return a $q$ vector suitable for calculating the total scattering cross section for 34 calculating the effect of finite acceptance angles on Time of Flight SESANS instruments. 35 If no acceptance is given, or unwanted (set "unwanted" flag in paramfile), no all_q vector is needed. 36 If the instrument has a rectangular acceptance, 2 all_q vectors are needed. 37 If the instrument has a circular acceptance, 1 all_q vector is needed 38 39 """ 40 if not data.has_no_finite_acceptance: 27 41 return [] 28 elif needs_Iqxy(data):42 elif data.has_yz_acceptance(data): 29 43 # compute qx, qy 30 44 Qx, Qy = np.meshgrid(qx, qy) … … 32 46 else: 33 47 # else only need q 48 # data.has_z_acceptance 34 49 return [q] 35 50 36 51 def transform(data, q_calc, Iq_calc, qmono, Iq_mono): 52 """ 53 Decides which transform type is to be used, based on the experiment data file contents (header) 54 (2016-03-19: currently controlled from parameters script) 55 nqmono is the number of q vectors to be used for the detector integration 56 """ 37 57 nqmono = len(qmono) 38 58 if nqmono == 0: … … 62 82 q_calc, Iq_calc) 63 83 64 def Cosine2D(data, q_calc, Iq_calc, qx, qy, Iq_mono):84 def call_Cosine2D(data, q_calc, Iq_calc, qx, qy, Iq_mono): 65 85 return hankel(data.x, data.y, data.lam * 1e-9, 66 86 data.sample.thickness / 10,
Note: See TracChangeset
for help on using the changeset viewer.