Changeset 79ac6f8 in sasview for sansmodels/src/sans/models/LamellarPSHGModel.py
- Timestamp:
- Jun 4, 2010 5: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/LamellarPSHGModel.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\lamellarPS_HG.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\lamellarPS_HG.h 23 AND RE-RUN THE GENERATOR SCRIPT 21 24 22 25 """ … … 27 30 28 31 class LamellarPSHGModel(CLamellarPSHGModel, BaseComponent): 29 """ Class that evaluates a LamellarPSHGModel model. 30 This file was auto-generated from ..\c_extensions\lamellarPS_HG.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 LamellarPSHGModel model. 34 This file was auto-generated from ..\c_extensions\lamellarPS_HG.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 spacing = 40.0 [A] … … 99 103 100 104 def __getstate__(self): 101 """ return object state for pickling and copying """ 105 """ 106 return object state for pickling and copying 107 """ 102 108 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 103 109 … … 105 111 106 112 def __setstate__(self, state): 107 """ create object from pickled state """ 113 """ 114 create object from pickled state 115 116 :param state: the state of the current model 117 118 """ 108 119 109 120 self.__dict__, model_state = state … … 113 124 114 125 115 def run(self, x = 0.0): 116 """ Evaluate the model 117 @param x: input q, or [q,phi] 118 @return: scattering function P(q) 126 def run(self, x=0.0): 127 """ 128 Evaluate the model 129 130 :param x: input q, or [q,phi] 131 132 :return: scattering function P(q) 133 119 134 """ 120 135 121 136 return CLamellarPSHGModel.run(self, x) 122 137 123 def runXY(self, x = 0.0): 124 """ Evaluate the model in cartesian coordinates 125 @param x: input q, or [qx, qy] 126 @return: scattering function P(q) 138 def runXY(self, x=0.0): 139 """ 140 Evaluate the model in cartesian coordinates 141 142 :param x: input q, or [qx, qy] 143 144 :return: scattering function P(q) 145 127 146 """ 128 147 129 148 return CLamellarPSHGModel.runXY(self, x) 130 149 131 def evalDistribution(self, x = []): 132 """ Evaluate the model in cartesian coordinates 133 @param x: input q[], or [qx[], qy[]] 134 @return: scattering function P(q[]) 150 def evalDistribution(self, x=[]): 151 """ 152 Evaluate the model in cartesian coordinates 153 154 :param x: input q[], or [qx[], qy[]] 155 156 :return: scattering function P(q[]) 157 135 158 """ 136 159 return CLamellarPSHGModel.evalDistribution(self, x) 137 160 138 161 def calculate_ER(self): 139 """ Calculate the effective radius for P(q)*S(q) 140 @return: the value of the effective radius 162 """ 163 Calculate the effective radius for P(q)*S(q) 164 165 :return: the value of the effective radius 166 141 167 """ 142 168 return CLamellarPSHGModel.calculate_ER(self) … … 144 170 def set_dispersion(self, parameter, dispersion): 145 171 """ 146 Set the dispersion object for a model parameter 147 @param parameter: name of the parameter [string] 148 @dispersion: dispersion object of type DispersionModel 172 Set the dispersion object for a model parameter 173 174 :param parameter: name of the parameter [string] 175 :param dispersion: dispersion object of type DispersionModel 176 149 177 """ 150 178 return CLamellarPSHGModel.set_dispersion(self, parameter, dispersion.cdisp)
Note: See TracChangeset
for help on using the changeset viewer.