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