Changeset 9316609 in sasview for sansmodels/src/sans/models/EllipsoidModel.py
- Timestamp:
- Oct 28, 2008 3:22:22 PM (16 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:
- 92320e5
- Parents:
- 89fef2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/EllipsoidModel.py
r96672c0 r9316609 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 7 If you use DANSE applications to do scientific research that leads to8 publication, we ask that you acknowledge the use of the software with the9 following sentence:10 11 "This work benefited from DANSE software developed under NSF award DMR-0520547."12 13 copyright 2008, University of Tennessee14 """15 16 2 """ Provide functionality for a C extension model 17 3 18 4 WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 19 DO NOT MODIFY THIS FILE, MODIFY ../c_extensions/ellipsoid.h5 DO NOT MODIFY THIS FILE, MODIFY ellipsoid.h 20 6 AND RE-RUN THE GENERATOR SCRIPT 21 7 8 @author: Mathieu Doucet / UTK 9 @contact: mathieu.doucet@nist.gov 22 10 """ 23 11 … … 28 16 class EllipsoidModel(CEllipsoidModel, BaseComponent): 29 17 """ Class that evaluates a EllipsoidModel model. 30 This file was auto-generated from ../c_extensions/ellipsoid.h.18 This file was auto-generated from ellipsoid.h. 31 19 Refer to that file and the structure it contains 32 20 for details of the model. … … 51 39 ## Name of the model 52 40 self.name = "EllipsoidModel" 53 41 self.description= """"P(q.alpha)= scale*f(q)^(2)+ bkg\n\ 42 f(q)= 3*(scatter_sld- scatter_solvent)*V*[sin(q*r(Ra,Rb,alpha)) - q*r*cos(qr(Ra,Rb,alpha))] 43 /[qr(Ra,Rb,alpha)]^(3)" 44 r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2) + Ra^(2)*(cos(alpha))^(2)]^(1/2) 45 scatter_sld: scattering length density of the scatter 46 solvent_sld: scattering length density of the solvent 47 V: volune of the Eliipsoid 48 Ra: radius along the rotation axis of the Ellipsoid 49 Rb: radius perpendicular to the rotation axis of the ellipsoid""" 54 50 ## Parameter details [units, min, max] 55 51 self.details = {} … … 65 61 def clone(self): 66 62 """ Return a identical copy of self """ 67 return self._clone(EllipsoidModel()) 63 obj = EllipsoidModel() 64 obj.params = copy.deepcopy(self.params) 65 return obj 68 66 69 67 def run(self, x = 0.0): … … 82 80 83 81 return CEllipsoidModel.runXY(self, x) 84 85 def set_dispersion(self, parameter, dispersion):86 """87 Set the dispersion object for a model parameter88 @param parameter: name of the parameter [string]89 @dispersion: dispersion object of type DispersionModel90 """91 return CEllipsoidModel.set_dispersion(self, parameter, dispersion.cdisp)92 93 82 94 83 # End of file
Note: See TracChangeset
for help on using the changeset viewer.