source: sasview/sansmodels/prototypes/DispCylinderModel.py @ e9d9081

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 e9d9081 was 7df1a50, checked in by Jae Cho <jhjcho@…>, 13 years ago

moving a file

  • Property mode set to 100644
File size: 1.9 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 disperse_cylinder.h
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.prototypes.c_models import CDispCylinderModel
14import copy   
15   
16class DispCylinderModel(CDispCylinderModel, BaseComponent):
17    """ Class that evaluates a DispCylinderModel model.
18        This file was auto-generated from disperse_cylinder.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 A
24         length          = 400.0 A
25         contrast        = 3e-006 A-2
26         background      = 0.0 cm-1
27         cyl_theta       = 1.57 rad
28         cyl_phi         = 0.0 rad
29         cyl_phi         = 0.0 rad
30         sigma_theta     = 0.0 rad
31         sigma_phi       = 0.0 rad
32         sigma_radius    = 0.0 rad
33         sigma_radius    = 0.0 rad
34         n_pts           = 25.0
35
36    """
37       
38    def __init__(self):
39        """ Initialization """
40       
41        # Initialize BaseComponent first, then sphere
42        BaseComponent.__init__(self)
43        CDispCylinderModel.__init__(self)
44       
45        ## Name of the model
46        self.name = "DispCylinderModel"
47   
48    def clone(self):
49        """ Return a identical copy of self """
50        obj = DispCylinderModel()
51        obj.params = copy.deepcopy(self.params)
52        return obj   
53   
54    def run(self, x = 0.0):
55        """ Evaluate the model
56            @param x: input q, or [q,phi]
57            @return: scattering function P(q)
58        """
59       
60        return CDispCylinderModel.run(self, x)
61   
62# End of file
Note: See TracBrowser for help on using the repository browser.