Changeset 79ac6f8 in sasview for sansmodels/src/sans/models/OblateModel.py
- Timestamp:
- Jun 4, 2010 3:04:49 PM (14 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/OblateModel.py
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 ..\c_extensions\oblate.h 20 AND RE-RUN THE GENERATOR SCRIPT 21 :WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 22 DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\oblate.h 23 AND RE-RUN THE GENERATOR SCRIPT 21 24 22 25 """ … … 27 30 28 31 class OblateModel(COblateModel, BaseComponent): 29 """ Class that evaluates a OblateModel model. 30 This file was auto-generated from ..\c_extensions\oblate.h. 31 Refer to that file and the structure it contains 32 for details of the model. 33 List of default parameters: 32 """ 33 Class that evaluates a OblateModel model. 34 This file was auto-generated from ..\c_extensions\oblate.h. 35 Refer to that file and the structure it contains 36 for details of the model. 37 List of default parameters: 34 38 scale = 1.0 35 39 major_core = 200.0 [A] … … 97 101 98 102 def __getstate__(self): 99 """ return object state for pickling and copying """ 103 """ 104 return object state for pickling and copying 105 """ 100 106 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 101 107 … … 103 109 104 110 def __setstate__(self, state): 105 """ create object from pickled state """ 111 """ 112 create object from pickled state 113 114 :param state: the state of the current model 115 116 """ 106 117 107 118 self.__dict__, model_state = state … … 111 122 112 123 113 def run(self, x = 0.0): 114 """ Evaluate the model 115 @param x: input q, or [q,phi] 116 @return: scattering function P(q) 124 def run(self, x=0.0): 125 """ 126 Evaluate the model 127 128 :param x: input q, or [q,phi] 129 130 :return: scattering function P(q) 131 117 132 """ 118 133 119 134 return COblateModel.run(self, x) 120 135 121 def runXY(self, x = 0.0): 122 """ Evaluate the model in cartesian coordinates 123 @param x: input q, or [qx, qy] 124 @return: scattering function P(q) 136 def runXY(self, x=0.0): 137 """ 138 Evaluate the model in cartesian coordinates 139 140 :param x: input q, or [qx, qy] 141 142 :return: scattering function P(q) 143 125 144 """ 126 145 127 146 return COblateModel.runXY(self, x) 128 147 129 def evalDistribution(self, x = []): 130 """ Evaluate the model in cartesian coordinates 131 @param x: input q[], or [qx[], qy[]] 132 @return: scattering function P(q[]) 148 def evalDistribution(self, x=[]): 149 """ 150 Evaluate the model in cartesian coordinates 151 152 :param x: input q[], or [qx[], qy[]] 153 154 :return: scattering function P(q[]) 155 133 156 """ 134 157 return COblateModel.evalDistribution(self, x) 135 158 136 159 def calculate_ER(self): 137 """ Calculate the effective radius for P(q)*S(q) 138 @return: the value of the effective radius 160 """ 161 Calculate the effective radius for P(q)*S(q) 162 163 :return: the value of the effective radius 164 139 165 """ 140 166 return COblateModel.calculate_ER(self) … … 142 168 def set_dispersion(self, parameter, dispersion): 143 169 """ 144 Set the dispersion object for a model parameter 145 @param parameter: name of the parameter [string] 146 @dispersion: dispersion object of type DispersionModel 170 Set the dispersion object for a model parameter 171 172 :param parameter: name of the parameter [string] 173 :param dispersion: dispersion object of type DispersionModel 174 147 175 """ 148 176 return COblateModel.set_dispersion(self, parameter, dispersion.cdisp)
Note: See TracChangeset
for help on using the changeset viewer.