source: sasview/sansmodels/src/sans/models/c_extensions/lamellar.c @ 812b901

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 812b901 was 34c3020, checked in by Gervaise Alina <gervyh@…>, 15 years ago

add model1D

  • Property mode set to 100644
File size: 984 bytes
Line 
1/**
2 * Scattering model for lamellar
3 * @author: Gervaise B. Alina / UTK
4 */
5
6#include "lamellar.h"
7#include <math.h>
8#include "libCylinder.h"
9#include <stdio.h>
10#include <stdlib.h>
11
12
13/**
14 * Function to evaluate 1D scattering function
15 * @param pars: parameters of the lamellar
16 * @param q: q-value
17 * @return: function value
18 */
19double lamellar_analytical_1D(LamellarParameters *pars, double q) {
20        double dp[5];
21       
22        // Fill paramater array
23        dp[0] = pars->scale;
24        dp[1] = pars->delta;
25        dp[2] = pars->sigma;
26        dp[3] = pars->contrast;
27        dp[4] = pars->background;
28       
29       
30        // Call library function to evaluate model
31        return LamellarFF(dp, q);       
32}
33
34double lamellar_analytical_2D(LamellarParameters *pars, double q, double phi){
35        return 1.0;
36}
37double lamellar_analytical_2DXY(LamellarParameters *pars, double qx, double qy){
38        return 1.0;
39}
40double lamellar_analytical_2D_scaled(LamellarParameters *pars, double q, double q_x, double q_y){
41        return 1.0;
42}
43
Note: See TracBrowser for help on using the repository browser.