/** * Scattering intensity for dispersed CEllipticalCylinderModel * * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY * DO NOT MODIFY THIS FILE, MODIFY elliptical_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 "elliptical_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_elliptical_cylinder_2D(double pars[], double q, double phi) { EllipticalCylinderParameters danse_pars; // List of default parameters: // pars[0]: scale = 1.0 // pars[1]: r_minor = 20.0 A // pars[2]: r_ratio = 1.5 A // pars[3]: length = 400.0 A // pars[4]: contrast = 3e-06 A-2 // pars[5]: background = 0.0 cm-1 // pars[6]: cyl_theta = 1.57 rad // pars[7]: cyl_phi = 0.0 rad // pars[8]: cyl_psi = 0.0 rad danse_pars.scale = pars[0]; danse_pars.r_minor = pars[1]; danse_pars.r_ratio = pars[2]; danse_pars.length = pars[3]; danse_pars.contrast = pars[4]; danse_pars.background = pars[5]; danse_pars.cyl_theta = pars[6]; danse_pars.cyl_phi = pars[7]; danse_pars.cyl_psi = pars[8]; return elliptical_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]: r_minor = 20.0 A // pars[2]: r_ratio = 1.5 A // pars[3]: length = 400.0 A // pars[4]: contrast = 3e-06 A-2 // pars[5]: background = 0.0 cm-1 // pars[6]: cyl_theta = 1.57 rad // pars[7]: cyl_phi = 0.0 rad // pars[8]: cyl_psi = 0.0 rad // pars[9]: dispersion of r_minor // pars[10]: dispersion of r_ratio // pars[11]: dispersion of cyl_theta // pars[12]: dispersion of cyl_phi // pars[13]: number of points in dispersion curve */ double disperse_elliptical_cylinder_analytical_2D(double dp[], double q, double phi) { int paramList[4]; double sigmaList[4]; int npts; int i; double pars[14]; // r_minor paramList[0] = 1; // r_ratio paramList[1] = 2; // cyl_theta paramList[2] = 6; // cyl_phi paramList[3] = 7; sigmaList[0] = dp[9]; sigmaList[1] = dp[10]; sigmaList[2] = dp[11]; sigmaList[3] = dp[12]; npts = (int)(floor(dp[13])); // Internal copy of parameters for(i=0; i<14; i++ ) { pars[i] = dp[i]; } return c_disperser( &oriented_elliptical_cylinder_2D, pars, 4, paramList, sigmaList, npts, q, phi ); }