Changeset 1cdfd47 in sasmodels
- Timestamp:
- Apr 5, 2018 2:06:19 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- bc1dac6
- Parents:
- d712a0f (diff), 05df1de (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. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r3221de0 r05df1de 593 593 # Check whether we have a list of ndarrays [qx,qy] 594 594 qx, qy = qdist 595 if not self._model_info.parameters.has_2d: 596 return self.calculate_Iq(np.sqrt(qx ** 2 + qy ** 2)) 597 else: 598 return self.calculate_Iq(qx, qy) 595 return self.calculate_Iq(qx, qy) 599 596 600 597 elif isinstance(qdist, np.ndarray): … … 677 674 call_details, values, is_magnetic = make_kernel_args(calculator, pairs) 678 675 #call_details.show() 679 #print("pairs", pairs) 676 #print("================ parameters ==================") 677 #for p, v in zip(parameters.call_parameters, pairs): print(p.name, v[0]) 680 678 #for k, p in enumerate(self._model_info.parameters.call_parameters): 681 679 # print(k, p.name, *pairs[k]) … … 871 869 CylinderModel().evalDistribution([0.1, 0.1]) 872 870 871 def magnetic_demo(): 872 Model = _make_standard_model('sphere') 873 model = Model() 874 model.setParam('M0:sld', 8) 875 q = np.linspace(-0.35, 0.35, 500) 876 qx, qy = np.meshgrid(q, q) 877 result = model.calculate_Iq(qx.flatten(), qy.flatten()) 878 result = result.reshape(qx.shape) 879 880 import pylab 881 pylab.imshow(np.log(result + 0.001)) 882 pylab.show() 883 873 884 if __name__ == "__main__": 874 885 print("cylinder(0.1,0.1)=%g"%test_cylinder()) 886 #magnetic_demo() 875 887 #test_product() 876 888 #test_structure_factor() -
doc/guide/pd/polydispersity.rst
r29afc50 rd712a0f 20 20 P(q) = \text{scale} \langle F^* F \rangle / V + \text{background} 21 21 22 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an 23 average over the size distribution. 22 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an 23 average over the size distribution $f(x; \bar x, \sigma)$, giving 24 25 .. math:: 26 27 P(q) = \frac{\text{scale}}{V} \int_\mathbb{R} 28 f(x; \bar x, \sigma) F^2(q, x)\, dx + \text{background} 24 29 25 30 Each distribution is characterized by a center value $\bar x$ or … … 41 46 with larger values of $N_\sigma$ required for heavier tailed distributions. 42 47 The scattering in general falls rapidly with $qr$ so the usual assumption 43 that $ G(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)G(r - 3\sigma_r)$48 that $f(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)f(r - 3\sigma_r)$ 44 49 will not contribute much to the average may not hold when particles are large. 45 50 This, too, will require increasing $N_\sigma$. … … 63 68 64 69 Additional distributions are under consideration. 70 71 .. note:: In 2009 IUPAC decided to introduce the new term 'dispersity' to replace 72 the term 'polydispersity' (see `Pure Appl. Chem., (2009), 81(2), 73 351-353 <http://media.iupac.org/publications/pac/2009/pdf/8102x0351.pdf>`_ 74 in order to make the terminology describing distributions of properties 75 unambiguous. Throughout the SasView documentation we continue to use the 76 term polydispersity because one of the consequences of the IUPAC change is 77 that orientational polydispersity would not meet their new criteria (which 78 requires dispersity to be dimensionless). 65 79 66 80 Suggested Applications
Note: See TracChangeset
for help on using the changeset viewer.