Changeset 79ac6f8 in sasview for sansmodels/src/sans/models/c_models
- Timestamp:
- Jun 4, 2010 5:04:49 PM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 5062bbf
- Parents:
- 7116b6e0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/modelTemplate.txt
rf9a1279 r79ac6f8 1 1 #!/usr/bin/env python 2 """3 This software was developed by the University of Tennessee as part of the4 Distributed Data Analysis of Neutron Scattering Experiments (DANSE)5 project funded by the US National Science Foundation.6 2 7 If you use DANSE applications to do scientific research that leads to 8 publication, we ask that you acknowledge the use of the software with the 9 following sentence: 3 ############################################################################## 4 # This software was developed by the University of Tennessee as part of the 5 # Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 6 # project funded by the US National Science Foundation. 7 # 8 # If you use DANSE applications to do scientific research that leads to 9 # publication, we ask that you acknowledge the use of the software with the 10 # following sentence: 11 # 12 # "This work benefited from DANSE software developed under NSF award DMR-0520547." 13 # 14 # copyright 2008, University of Tennessee 15 ############################################################################## 10 16 11 "This work benefited from DANSE software developed under NSF award DMR-0520547."12 17 13 copyright 2008, University of Tennessee 14 """ 18 """ 19 Provide functionality for a C extension model 15 20 16 """ Provide functionality for a C extension model 17 18 WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 19 DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE] 20 AND RE-RUN THE GENERATOR SCRIPT 21 :WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 22 DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE] 23 AND RE-RUN THE GENERATOR SCRIPT 21 24 22 25 """ … … 27 30 28 31 class [PYTHONCLASS]([CPYTHONCLASS], BaseComponent): 29 """ Class that evaluates a [PYTHONCLASS] model. 30 This file was auto-generated from [INCLUDE_FILE]. 31 Refer to that file and the structure it contains 32 for details of the model. 33 [DEFAULT_LIST] 32 """ 33 Class that evaluates a [PYTHONCLASS] model. 34 This file was auto-generated from [INCLUDE_FILE]. 35 Refer to that file and the structure it contains 36 for details of the model. 37 [DEFAULT_LIST] 34 38 """ 35 39 … … 58 62 59 63 def __getstate__(self): 60 """ return object state for pickling and copying """ 64 """ 65 return object state for pickling and copying 66 """ 61 67 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 62 68 … … 64 70 65 71 def __setstate__(self, state): 66 """ create object from pickled state """ 72 """ 73 create object from pickled state 74 75 :param state: the state of the current model 76 77 """ 67 78 68 79 self.__dict__, model_state = state … … 72 83 73 84 74 def run(self, x = 0.0): 75 """ Evaluate the model 76 @param x: input q, or [q,phi] 77 @return: scattering function P(q) 85 def run(self, x=0.0): 86 """ 87 Evaluate the model 88 89 :param x: input q, or [q,phi] 90 91 :return: scattering function P(q) 92 78 93 """ 79 94 80 95 return [CPYTHONCLASS].run(self, x) 81 96 82 def runXY(self, x = 0.0): 83 """ Evaluate the model in cartesian coordinates 84 @param x: input q, or [qx, qy] 85 @return: scattering function P(q) 97 def runXY(self, x=0.0): 98 """ 99 Evaluate the model in cartesian coordinates 100 101 :param x: input q, or [qx, qy] 102 103 :return: scattering function P(q) 104 86 105 """ 87 106 88 107 return [CPYTHONCLASS].runXY(self, x) 89 108 90 def evalDistribution(self, x = []): 91 """ Evaluate the model in cartesian coordinates 92 @param x: input q[], or [qx[], qy[]] 93 @return: scattering function P(q[]) 109 def evalDistribution(self, x=[]): 110 """ 111 Evaluate the model in cartesian coordinates 112 113 :param x: input q[], or [qx[], qy[]] 114 115 :return: scattering function P(q[]) 116 94 117 """ 95 118 return [CPYTHONCLASS].evalDistribution(self, x) 96 119 97 120 def calculate_ER(self): 98 """ Calculate the effective radius for P(q)*S(q) 99 @return: the value of the effective radius 121 """ 122 Calculate the effective radius for P(q)*S(q) 123 124 :return: the value of the effective radius 125 100 126 """ 101 127 return [CPYTHONCLASS].calculate_ER(self) … … 103 129 def set_dispersion(self, parameter, dispersion): 104 130 """ 105 Set the dispersion object for a model parameter 106 @param parameter: name of the parameter [string] 107 @dispersion: dispersion object of type DispersionModel 131 Set the dispersion object for a model parameter 132 133 :param parameter: name of the parameter [string] 134 :param dispersion: dispersion object of type DispersionModel 135 108 136 """ 109 137 return [CPYTHONCLASS].set_dispersion(self, parameter, dispersion.cdisp)
Note: See TracChangeset
for help on using the changeset viewer.