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