[ae3ce4e] | 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 [INCLUDE_FILE] |
---|
| 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.c_models import [CPYTHONCLASS] |
---|
| 14 | import copy |
---|
| 15 | |
---|
| 16 | class [PYTHONCLASS]([CPYTHONCLASS], BaseComponent): |
---|
| 17 | """ Class that evaluates a [PYTHONCLASS] model. |
---|
| 18 | This file was auto-generated from [INCLUDE_FILE]. |
---|
| 19 | Refer to that file and the structure it contains |
---|
| 20 | for details of the model. |
---|
| 21 | [DEFAULT_LIST] |
---|
| 22 | """ |
---|
| 23 | |
---|
| 24 | def __init__(self): |
---|
| 25 | """ Initialization """ |
---|
| 26 | |
---|
| 27 | # Initialize BaseComponent first, then sphere |
---|
| 28 | BaseComponent.__init__(self) |
---|
| 29 | [CPYTHONCLASS].__init__(self) |
---|
| 30 | |
---|
| 31 | ## Name of the model |
---|
| 32 | self.name = "[PYTHONCLASS]" |
---|
[9316609] | 33 | self.description= """[DESCRIPTION]""" |
---|
[ae3ce4e] | 34 | [PAR_DETAILS] |
---|
| 35 | |
---|
| 36 | def clone(self): |
---|
| 37 | """ Return a identical copy of self """ |
---|
| 38 | obj = [PYTHONCLASS]() |
---|
| 39 | obj.params = copy.deepcopy(self.params) |
---|
| 40 | return obj |
---|
| 41 | |
---|
| 42 | def run(self, x = 0.0): |
---|
| 43 | """ Evaluate the model |
---|
| 44 | @param x: input q, or [q,phi] |
---|
| 45 | @return: scattering function P(q) |
---|
| 46 | """ |
---|
| 47 | |
---|
| 48 | return [CPYTHONCLASS].run(self, x) |
---|
| 49 | |
---|
| 50 | def runXY(self, x = 0.0): |
---|
| 51 | """ Evaluate the model in cartesian coordinates |
---|
| 52 | @param x: input q, or [qx, qy] |
---|
| 53 | @return: scattering function P(q) |
---|
| 54 | """ |
---|
| 55 | |
---|
| 56 | return [CPYTHONCLASS].runXY(self, x) |
---|
| 57 | |
---|
| 58 | # End of file |
---|