Changeset 31df0c9 in sasmodels for sasmodels/models/parallelepiped.py
- Timestamp:
- Aug 1, 2017 4:38:47 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 1511c37c
- Parents:
- d49ca5c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/parallelepiped.py
r34a9e4e r31df0c9 22 22 .. note:: 23 23 24 The three dimensions of the parallelepiped (strictly here a cuboid) may be given in 24 The three dimensions of the parallelepiped (strictly here a cuboid) may be given in 25 25 $any$ size order. To avoid multiple fit solutions, especially 26 with Monte-Carlo fit methods, it may be advisable to restrict their ranges. There may 27 be a number of closely similar "best fits", so some trial and error, or fixing of some 26 with Monte-Carlo fit methods, it may be advisable to restrict their ranges. There may 27 be a number of closely similar "best fits", so some trial and error, or fixing of some 28 28 dimensions at expected values, may help. 29 29 … … 115 115 116 116 On introducing "Orientational Distribution" in the angles, "distribution of theta" and "distribution of phi" parameters will 117 appear. These are actually rotations about axes $\delta_1$ and $\delta_2$ of the parallelepiped, perpendicular to the $a$ x $c$ and $b$ x $c$ faces. 118 (When $\theta = \phi = 0$ these are parallel to the $Y$ and $X$ axes of the instrument.) The third orientation distribution, in $\psi$, is 119 about the $c$ axis of the particle, perpendicular to the $a$ x $b$ face. Some experimentation may be required to 120 understand the 2d patterns fully. (Earlier implementations had numerical integration issues in some circumstances when orientation 121 distributions passed through 90 degrees, such situations, with very broad distributions, should still be approached with care.) 122 123 117 appear. These are actually rotations about axes $\delta_1$ and $\delta_2$ of the parallelepiped, perpendicular to the $a$ x $c$ and $b$ x $c$ faces. 118 (When $\theta = \phi = 0$ these are parallel to the $Y$ and $X$ axes of the instrument.) The third orientation distribution, in $\psi$, is 119 about the $c$ axis of the particle, perpendicular to the $a$ x $b$ face. Some experimentation may be required to 120 understand the 2d patterns fully. (Earlier implementations had numerical integration issues in some circumstances when orientation 121 distributions passed through 90 degrees, such situations, with very broad distributions, should still be approached with care.) 122 123 124 124 For a given orientation of the parallelepiped, the 2D form factor is 125 125 calculated as … … 241 241 242 242 # VR defaults to 1.0 243 244 245 def random(): 246 import numpy as np 247 a, b, c = 10**np.random.uniform(1, 4.7, size=3) 248 pars = dict( 249 length_a=a, 250 length_b=b, 251 length_c=c, 252 ) 253 return pars 254 243 255 244 256 # parameters for demo
Note: See TracChangeset
for help on using the changeset viewer.