source: sasview/sansmodels/igor_wrapper/templates/disperse_template.c @ a5e14410

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since a5e14410 was 25a60dc1, checked in by Jae Cho <jhjcho@…>, 13 years ago

moving a folder

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[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 */
28double 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 */
45double 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   
Note: See TracBrowser for help on using the repository browser.