Changeset 8dc0b746 in sasview for sansmodels/src/sans/models/c_extensions
- Timestamp:
- Aug 4, 2009 6:17:28 PM (15 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:
- 9188cc1
- Parents:
- 96b59384
- Location:
- sansmodels/src/sans/models/c_extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/prolate.c
r27a0771 r8dc0b746 18 18 */ 19 19 double prolate_analytical_1D(ProlateParameters *pars, double q) { 20 double dp[ 10];21 20 double dp[8]; 21 22 22 // Fill paramater array 23 23 dp[0] = pars->scale; … … 29 29 dp[6] = pars->sld_solvent; 30 30 dp[7] = pars->background; 31 dp[8] = pars->axis_theta; 32 dp[9] = pars->axis_phi; 33 31 34 32 // Call library function to evaluate model 35 return ProlateForm(dp, q); 33 return ProlateForm(dp, q); 36 34 } 37 35 … … 45 43 double q; 46 44 q = sqrt(qx*qx+qy*qy); 47 return prolate_analytical_ 2D_scaled(pars, q, qx/q, qy/q);48 } 45 return prolate_analytical_1D(pars, q); 46 } 49 47 50 48 … … 57 55 */ 58 56 double prolate_analytical_2D(ProlateParameters *pars, double q, double phi) { 59 return prolate_analytical_ 2D_scaled(pars, q, cos(phi), sin(phi));60 } 61 57 return prolate_analytical_1D(pars, q); 58 } 59 62 60 /** 63 61 * Function to evaluate 2D scattering function … … 68 66 * @return: function value 69 67 */ 70 double prolate_analytical_2D_scaled(ProlateParameters *pars, double q, double q_x, double q_y) {71 72 return 1.0;73 }74 68 //double prolate_analytical_2D_scaled(ProlateParameters *pars, double q, double q_x, double q_y) { 69 // 70 // return 1.0; 71 //} 72 -
sansmodels/src/sans/models/c_extensions/prolate.h
r27a0771 r8dc0b746 3 3 /** Structure definition for prolate parameters 4 4 * [PYTHONCLASS] = ProlateModel 5 * [DISP_PARAMS] = major_core, minor_core, major_shell,minor_shell, axis_theta, axis_phi 6 [DESCRIPTION] = <text> Calculates the form factor for a monodisperse prolate ellipsoid particle with a 7 core/shell structure 8 Note:It is the users' responsibility to ensure that shell radii are larger than core radii, and 9 that major radii are larger than minor radii.</text> 10 11 [FIXED] = <text>axis_phi.width; axis_theta.width; major_core.width;minor_core.width; major_shell; minor_shell</text> 12 [ORIENTATION_PARAMS] = <text>axis_phi; axis_theta; axis_phi.width; axis_theta.width</text> 5 * [DISP_PARAMS] = major_core, minor_core, major_shell,minor_shell 6 [DESCRIPTION] = <text>[ProlateCoreShellModel] Calculates the form factor for a prolate 7 ellipsoid particle with a core_shell structure. 8 The form factor is averaged over all possible 9 orientations of the ellipsoid such that P(q) 10 = scale*<f^2>/Vol + bkg, where f is the 11 single particle scattering amplitude. 12 [Parameters]: 13 major_core = radius of major_core, 14 minor_core = radius of minor_core, 15 major_shell = radius of major_shell, 16 minor_shell = radius of minor_shell, 17 contrast = SLD_core - SLD_shell 18 sld_solvent = SLD_solvent 19 background = Incoherent bkg 20 scale = scale 21 Note:It is the users' responsibility to ensure 22 that shell radii are larger than core radii. 23 </text> 24 [FIXED] = <text>major_core.width;minor_core.width; major_shell.width; minor_shell.width</text> 25 [ORIENTATION_PARAMS] = 13 26 14 27 **/ … … 38 51 // [DEFAULT]=background=0.001 [1/cm] 39 52 double background; 40 /// Orientation of the prolate axis w/respect incoming beam [rad]41 // [DEFAULT]=axis_theta=1.0 [rad]42 double axis_theta;43 /// Orientation of the prolate in the plane of the detector [rad]44 // [DEFAULT]=axis_phi=1.0 [rad]45 double axis_phi;46 53 47 54 } ProlateParameters; … … 55 62 double prolate_analytical_2D(ProlateParameters *pars, double q, double phi); 56 63 double prolate_analytical_2DXY(ProlateParameters *pars, double qx, double qy); 57 double prolate_analytical_2D_scaled(ProlateParameters *pars, double q, double q_x, double q_y);64 //double prolate_analytical_2D_scaled(ProlateParameters *pars, double q, double q_x, double q_y); 58 65 59 66 #endif
Note: See TracChangeset
for help on using the changeset viewer.