/** * Scattering intensity for dispersed CCoreShellCylinderModel * * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY * DO NOT MODIFY THIS FILE, MODIFY core_shell_cylinder.h * AND RE-RUN THE GENERATOR SCRIPT * * This code was written as part of the DANSE project * http://danse.us/trac/sans/ * * Copyright 2007: University of Tennessee, for the DANSE project */ #include "core_shell_cylinder.h" #include #include "libCylinder.h" #include "libSphere.h" #include "c_disperser.h" /** * Function to evaluate 2D scattering function * * @param dp: parameters of the function * @param q: q-value * @param phi: angle of the q-vector in the plane of the detector, relative to q_x * @return: function value */ double oriented_core_shell_cylinder_2D(double pars[], double q, double phi) { CoreShellCylinderParameters danse_pars; // List of default parameters: // pars[0]: scale = 1.0 // pars[1]: radius = 20.0 A // pars[2]: thickness = 10.0 A // pars[3]: length = 400.0 A // pars[4]: core_sld = 1e-06 A-2 // pars[5]: shell_sld = 4e-06 A-2 // pars[6]: solvent_sld = 1e-06 A-2 // pars[7]: background = 0.0 cm-1 // pars[8]: axis_theta = 1.57 rad // pars[9]: axis_phi = 0.0 rad danse_pars.scale = pars[0]; danse_pars.radius = pars[1]; danse_pars.thickness = pars[2]; danse_pars.length = pars[3]; danse_pars.core_sld = pars[4]; danse_pars.shell_sld = pars[5]; danse_pars.solvent_sld = pars[6]; danse_pars.background = pars[7]; danse_pars.axis_theta = pars[8]; danse_pars.axis_phi = pars[9]; return core_shell_cylinder_analytical_2D(&danse_pars, q, phi); } /** * Function to evaluate dispersed 2D scattering function * * @param dp: parameters of the function * @param q: q-value * @param phi: angle of the q-vector in the plane of the detector, relative to q_x * @return: function value * // List of default parameters: // pars[0]: scale = 1.0 // pars[1]: radius = 20.0 A // pars[2]: thickness = 10.0 A // pars[3]: length = 400.0 A // pars[4]: core_sld = 1e-06 A-2 // pars[5]: shell_sld = 4e-06 A-2 // pars[6]: solvent_sld = 1e-06 A-2 // pars[7]: background = 0.0 cm-1 // pars[8]: axis_theta = 1.57 rad // pars[9]: axis_phi = 0.0 rad // pars[10]: dispersion of radius // pars[11]: dispersion of thickness // pars[12]: dispersion of axis_theta // pars[13]: dispersion of axis_phi // pars[14]: number of points in dispersion curve */ double disperse_core_shell_cylinder_analytical_2D(double dp[], double q, double phi) { int paramList[4]; double sigmaList[4]; int npts; int i; double pars[15]; // radius paramList[0] = 1; // thickness paramList[1] = 2; // axis_theta paramList[2] = 8; // axis_phi paramList[3] = 9; sigmaList[0] = dp[10]; sigmaList[1] = dp[11]; sigmaList[2] = dp[12]; sigmaList[3] = dp[13]; npts = (int)(floor(dp[14])); // Internal copy of parameters for(i=0; i<15; i++ ) { pars[i] = dp[i]; } return c_disperser( &oriented_core_shell_cylinder_2D, pars, 4, paramList, sigmaList, npts, q, phi ); }