ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 1aaa579 was
79ac6f8,
checked in by Gervaise Alina <gervyh@…>, 15 years ago
|
working on documentation
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | """ |
---|
3 | Provide F(x)= P(|x|)*S(|x|) + bkd |
---|
4 | Fractal as a BaseComponent model |
---|
5 | """ |
---|
6 | |
---|
7 | from sans.models.FractalModel import FractalModel |
---|
8 | import math |
---|
9 | |
---|
10 | class FractalAbsModel(FractalModel): |
---|
11 | """ |
---|
12 | Class that evaluates a Fractal function. |
---|
13 | |
---|
14 | F(|x|)= P(|x|)*S(|x|) + bkd |
---|
15 | The model has Seven parameters: |
---|
16 | scale = Volume fraction |
---|
17 | radius = Block radius |
---|
18 | fractal_dim = Fractal dimension |
---|
19 | corr_length = correlation Length |
---|
20 | block_sld = SDL block |
---|
21 | solvent_sld = SDL solvent |
---|
22 | background = background |
---|
23 | |
---|
24 | """ |
---|
25 | def __init__(self): |
---|
26 | """Initialization """ |
---|
27 | # Initialize FractalModel |
---|
28 | |
---|
29 | FractalModel.__init__(self) |
---|
30 | ## Name of the model |
---|
31 | self.name = "Absolute Number Density Fractal" |
---|
32 | self.description=""" |
---|
33 | I(x)= P(|x|)*S(|x|) + bkd |
---|
34 | |
---|
35 | p(x)= scale* V^(2)*delta^(2)* F(x*radius)^(2) |
---|
36 | F(x) = 3*[sin(x)-x cos(x)]/x**3 |
---|
37 | |
---|
38 | The model has Seven parameters: |
---|
39 | scale = Volume fraction |
---|
40 | radius = Block radius |
---|
41 | fractal_dim = Fractal dimension |
---|
42 | corr_length = correlation Length |
---|
43 | block_sld = SDL block |
---|
44 | solvent_sld = SDL solvent |
---|
45 | background = background |
---|
46 | """ |
---|
47 | def _Fractal(self, x): |
---|
48 | """ |
---|
49 | """ |
---|
50 | return FractalModel._Fractal(self, math.fabs(x)) |
---|
51 | |
---|
52 | |
---|
Note: See
TracBrowser
for help on using the repository browser.