# Changeset 384d114 in sasmodels

Ignore:
Timestamp:
Jan 27, 2016 4:06:30 PM (8 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:
09ebe8c
Message:

doc and delint

File:
1 edited

### Legend:

Unmodified
 r09ebe8c def make_q(q_max, Rmax): """ r""" Return a $q$ vector suitable for SESANS covering from $2\pi/ (10 R_{\max})$ to $q_max$. def hankel(SElength, wavelength, thickness, q, Iq): """ r""" Compute the expected SESANS polarization for a given SANS pattern. Uses the hankel transform followed by the exponential.  The values for zz (or spin echo length, or delta), wavelength and sample thickness information should come from the dataset.  *q* should be chosen such that the oscillations in *I(q)* are well sampled (e.g., 5*2*pi/d_max). Uses the hankel transform followed by the exponential.  The values for *zz* (or spin echo length, or delta), wavelength and sample thickness should come from the dataset.  $q$ should be chosen such that the oscillations in $I(q)$ are well sampled (e.g., $5 \cdot 2 \pi/d_{\max}$). *SElength* [A] is the set of z points at which to compute the hankel transform *SElength* [A] is the set of $z$ points at which to compute the Hankel transform *wavelength* [m]  is the wavelength of each individual point *zz* *thickness* [cm] is the sample thickness. *q* [A^{-1}] is the set of q points at which the model has been computed. These should be equally spaced. *q* [A$^{-1}$] is the set of $q$ points at which the model has been computed. These should be equally spaced. *I* [cm^{-1}] is the value of the SANS model at *q* *I* [cm$^{-1}$] is the value of the SANS model at *q* """ G = np.zeros(len(SElength), 'd') integr = besselj(0, q*SElength[i])*Iq*q G[i] = np.sum(integr) dq=(q[1]-q[0])*1e10   # [m^-1] step size in q, needed for integration G *= dq*1e10*2*pi # integr step, conver q into [m**-1] and 2 pi circle integr # [m^-1] step size in q, needed for integration dq=(q[1]-q[0])*1e10 # integration step, convert q into [m**-1] and 2 pi circle integration G *= dq*1e10*2*pi P = exp(thickness*wavelength**2/(4*pi**2)*(G-G[0]))