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 c09ace41 was
7df1a50,
checked in by Jae Cho <jhjcho@…>, 13 years ago
|
moving a file
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | """ Provide functionality for a C extension model |
---|
3 | |
---|
4 | WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY |
---|
5 | DO NOT MODIFY THIS FILE, MODIFY ../prototypes/src/sphere_fast.h |
---|
6 | AND RE-RUN THE GENERATOR SCRIPT |
---|
7 | |
---|
8 | @author: Mathieu Doucet / UTK |
---|
9 | @contact: mathieu.doucet@nist.gov |
---|
10 | """ |
---|
11 | |
---|
12 | from sans.models.BaseComponent import BaseComponent |
---|
13 | from sans_extension.prototypes.c_models import CSimSphereF |
---|
14 | import copy |
---|
15 | |
---|
16 | class SimSphereF(CSimSphereF, BaseComponent): |
---|
17 | """ Class that evaluates a SimSphereF model. |
---|
18 | This file was auto-generated from ../prototypes/src/sphere_fast.h. |
---|
19 | Refer to that file and the structure it contains |
---|
20 | for details of the model. |
---|
21 | List of default parameters: |
---|
22 | scale = 1.0 |
---|
23 | radius = 20.0 |
---|
24 | |
---|
25 | """ |
---|
26 | |
---|
27 | def __init__(self): |
---|
28 | """ Initialization """ |
---|
29 | |
---|
30 | # Initialize BaseComponent first, then sphere |
---|
31 | BaseComponent.__init__(self) |
---|
32 | CSimSphereF.__init__(self) |
---|
33 | |
---|
34 | ## Name of the model |
---|
35 | self.name = "SimSphereF" |
---|
36 | |
---|
37 | def clone(self): |
---|
38 | """ Return a identical copy of self """ |
---|
39 | obj = SimSphereF() |
---|
40 | obj.params = copy.deepcopy(self.params) |
---|
41 | return obj |
---|
42 | |
---|
43 | def run(self, x = 0.0): |
---|
44 | """ Evaluate the model |
---|
45 | @param x: input q, or [q,phi] |
---|
46 | @return: scattering function P(q) |
---|
47 | """ |
---|
48 | |
---|
49 | return CSimSphereF.run(self, x) |
---|
50 | |
---|
51 | # End of file |
---|
Note: See
TracBrowser
for help on using the repository browser.