[ae3ce4e] | 1 | /** |
---|
| 2 | * Scattering intensity for dispersed [PYTHONCLASS] |
---|
| 3 | * |
---|
| 4 | * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY |
---|
| 5 | * DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE] |
---|
| 6 | * AND RE-RUN THE GENERATOR SCRIPT |
---|
| 7 | * |
---|
| 8 | * This code was written as part of the DANSE project |
---|
| 9 | * http://danse.us/trac/sans/ |
---|
| 10 | * |
---|
| 11 | * Copyright 2007: University of Tennessee, for the DANSE project |
---|
| 12 | */ |
---|
| 13 | |
---|
| 14 | #include "[INCLUDE_FILE]" |
---|
| 15 | #include <math.h> |
---|
| 16 | #include "libCylinder.h" |
---|
| 17 | #include "libSphere.h" |
---|
| 18 | #include "c_disperser.h" |
---|
| 19 | |
---|
| 20 | /** |
---|
| 21 | * Function to evaluate 2D scattering function |
---|
| 22 | * |
---|
| 23 | * @param dp: parameters of the function |
---|
| 24 | * @param q: q-value |
---|
| 25 | * @param phi: angle of the q-vector in the plane of the detector, relative to q_x |
---|
| 26 | * @return: function value |
---|
| 27 | */ |
---|
| 28 | double oriented_[C_FILENAME]_2D(double pars[], double q, double phi) { |
---|
| 29 | [MODELSTRUCT] danse_pars; |
---|
| 30 | |
---|
| 31 | [BINDINGS] |
---|
| 32 | return [C_FILENAME]_analytical_2D(&danse_pars, q, phi); |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | /** |
---|
| 36 | * Function to evaluate dispersed 2D scattering function |
---|
| 37 | * |
---|
| 38 | * @param dp: parameters of the function |
---|
| 39 | * @param q: q-value |
---|
| 40 | * @param phi: angle of the q-vector in the plane of the detector, relative to q_x |
---|
| 41 | * @return: function value |
---|
| 42 | * |
---|
| 43 | [PARS_LIST] |
---|
| 44 | */ |
---|
| 45 | double disperse_[C_FILENAME]_analytical_2D(double dp[], double q, double phi) { |
---|
| 46 | int paramList[[NDISPERSE]]; |
---|
| 47 | double sigmaList[[NDISPERSE]]; |
---|
| 48 | int npts; |
---|
| 49 | int i; |
---|
| 50 | double pars[[NPARS]]; |
---|
| 51 | |
---|
| 52 | [DISPERSE] |
---|
| 53 | |
---|
| 54 | // Internal copy of parameters |
---|
| 55 | for(i=0; i<[NPARS]; i++ ) { |
---|
| 56 | pars[i] = dp[i]; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | return c_disperser( &oriented_[C_FILENAME]_2D, pars, [NDISPERSE], |
---|
| 60 | paramList, sigmaList, npts, q, phi ); |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | } |
---|
| 64 | |
---|