source: sasview/sansmodels/src/sans/models/c_extensions/modelTemplate.txt @ 43ecc75f

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 43ecc75f was 9316609, checked in by Gervaise Alina <gervyh@…>, 16 years ago

added description to model

  • Property mode set to 100644
File size: 1.7 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 [INCLUDE_FILE]
6                 AND RE-RUN THE GENERATOR SCRIPT
7
8    @author: Mathieu Doucet / UTK
9    @contact: mathieu.doucet@nist.gov
10"""
11
12from sans.models.BaseComponent import BaseComponent
13from sans_extension.c_models import [CPYTHONCLASS]
14import copy   
15   
16class [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]"
33        self.description= """[DESCRIPTION]"""
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
Note: See TracBrowser for help on using the repository browser.