Changeset a8eab1c in sasview for sansmodels
- Timestamp:
- Jan 5, 2012 11:05:33 AM (13 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:
- 37805e9
- Parents:
- dd60b45
- Location:
- sansmodels/src
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_extensions/sphere.h
r67424cd ra8eab1c 1 1 #if !defined(sphere_h) 2 2 #define sphere_h 3 #include "parameters.hh" 3 4 4 5 /** … … 19 20 //[ORIENTATION_PARAMS]= <text> </text> 20 21 21 typedef struct { 22 /// Scale factor 23 // [DEFAULT]=scale= 1.0 24 double scale; 22 class SphereModel{ 23 public: 24 // Model parameters 25 /// Scale factor 26 // [DEFAULT]=scale= 1.0 27 Parameter scale; 25 28 26 ///Radius of sphere [A]27 28 doubleradius;29 /// Radius of sphere [A] 30 // [DEFAULT]=radius=60.0 [A] 31 Parameter radius; 29 32 30 ///sldSph [1/A^(2)]31 32 doublesldSph;33 /// sldSph [1/A^(2)] 34 // [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)] 35 Parameter sldSph; 33 36 34 ///sldSolv [1/A^(2)]35 36 doublesldSolv;37 /// sldSolv [1/A^(2)] 38 // [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)] 39 Parameter sldSolv; 37 40 38 /// Incoherent Background [1/cm] 39 // [DEFAULT]=background=0 [1/cm] 40 double background; 41 } SphereParameters; 41 /// Incoherent Background [1/cm] 42 // [DEFAULT]=background=0 [1/cm] 43 Parameter background; 44 45 // Constructor 46 SphereModel(); 47 48 // Operators to get I(Q) 49 double operator()(double q); 50 double operator()(double qx, double qy); 51 double calculate_ER(); 52 double evaluate_rphi(double q, double phi); 53 }; 42 54 43 55 44 45 /// 1D scattering function46 //double sphere_analytical_1D(SphereParameters *pars, double q);47 48 /// 2D scattering function49 //double sphere_analytical_2D(SphereParameters *pars, double q, double phi);50 //double sphere_analytical_2DXY(SphereParameters *pars, double qx, double qy);51 52 56 #endif -
sansmodels/src/c_models/models.hh
rdd60b45 ra8eab1c 29 29 30 30 31 32 class SphereModel{33 public:34 // Model parameters35 Parameter radius;36 Parameter scale;37 Parameter sldSph;38 Parameter sldSolv;39 Parameter background;40 41 // Constructor42 SphereModel();43 44 // Operators to get I(Q)45 double operator()(double q);46 double operator()(double qx, double qy);47 double calculate_ER();48 double evaluate_rphi(double q, double phi);49 };50 31 51 32 -
sansmodels/src/c_models/sphere.cpp
r67424cd ra8eab1c 25 25 #include <stdio.h> 26 26 using namespace std; 27 #include "sphere.h" 27 28 28 29 extern "C" { 29 30 #include "libSphere.h" 30 #include "sphere.h"31 31 } 32 32
Note: See TracChangeset
for help on using the changeset viewer.