Changeset 79ac6f8 in sasview for sansmodels/src/sans/models/LamellarModel.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/LamellarModel.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\lamellar.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\lamellar.h 23 AND RE-RUN THE GENERATOR SCRIPT 21 24 22 25 """ … … 27 30 28 31 class LamellarModel(CLamellarModel, BaseComponent): 29 """ Class that evaluates a LamellarModel model. 30 This file was auto-generated from ..\c_extensions\lamellar.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 LamellarModel model. 34 This file was auto-generated from ..\c_extensions\lamellar.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 bi_thick = 50.0 [A] … … 79 83 80 84 def __getstate__(self): 81 """ return object state for pickling and copying """ 85 """ 86 return object state for pickling and copying 87 """ 82 88 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 83 89 … … 85 91 86 92 def __setstate__(self, state): 87 """ create object from pickled state """ 93 """ 94 create object from pickled state 95 96 :param state: the state of the current model 97 98 """ 88 99 89 100 self.__dict__, model_state = state … … 93 104 94 105 95 def run(self, x = 0.0): 96 """ Evaluate the model 97 @param x: input q, or [q,phi] 98 @return: scattering function P(q) 106 def run(self, x=0.0): 107 """ 108 Evaluate the model 109 110 :param x: input q, or [q,phi] 111 112 :return: scattering function P(q) 113 99 114 """ 100 115 101 116 return CLamellarModel.run(self, x) 102 117 103 def runXY(self, x = 0.0): 104 """ Evaluate the model in cartesian coordinates 105 @param x: input q, or [qx, qy] 106 @return: scattering function P(q) 118 def runXY(self, x=0.0): 119 """ 120 Evaluate the model in cartesian coordinates 121 122 :param x: input q, or [qx, qy] 123 124 :return: scattering function P(q) 125 107 126 """ 108 127 109 128 return CLamellarModel.runXY(self, x) 110 129 111 def evalDistribution(self, x = []): 112 """ Evaluate the model in cartesian coordinates 113 @param x: input q[], or [qx[], qy[]] 114 @return: scattering function P(q[]) 130 def evalDistribution(self, x=[]): 131 """ 132 Evaluate the model in cartesian coordinates 133 134 :param x: input q[], or [qx[], qy[]] 135 136 :return: scattering function P(q[]) 137 115 138 """ 116 139 return CLamellarModel.evalDistribution(self, x) 117 140 118 141 def calculate_ER(self): 119 """ Calculate the effective radius for P(q)*S(q) 120 @return: the value of the effective radius 142 """ 143 Calculate the effective radius for P(q)*S(q) 144 145 :return: the value of the effective radius 146 121 147 """ 122 148 return CLamellarModel.calculate_ER(self) … … 124 150 def set_dispersion(self, parameter, dispersion): 125 151 """ 126 Set the dispersion object for a model parameter 127 @param parameter: name of the parameter [string] 128 @dispersion: dispersion object of type DispersionModel 152 Set the dispersion object for a model parameter 153 154 :param parameter: name of the parameter [string] 155 :param dispersion: dispersion object of type DispersionModel 156 129 157 """ 130 158 return CLamellarModel.set_dispersion(self, parameter, dispersion.cdisp)
Note: See TracChangeset
for help on using the changeset viewer.