1 | #if !defined(invertor_h) |
---|
2 | #define invertor_h |
---|
3 | |
---|
4 | /** |
---|
5 | * Internal data structure for P(r) inversion |
---|
6 | */ |
---|
7 | typedef struct { |
---|
8 | /// Maximum distance between any two points in the system |
---|
9 | double d_max; |
---|
10 | /// q data |
---|
11 | double *x; |
---|
12 | /// I(q) data |
---|
13 | double *y; |
---|
14 | /// dI(q) data |
---|
15 | double *err; |
---|
16 | /// Number of q points |
---|
17 | int npoints; |
---|
18 | /// Number of I(q) points |
---|
19 | int ny; |
---|
20 | /// Number of dI(q) points |
---|
21 | int nerr; |
---|
22 | /// Alpha value |
---|
23 | double alpha; |
---|
24 | /// Minimum q to include in inversion |
---|
25 | double q_min; |
---|
26 | /// Maximum q to include in inversion |
---|
27 | double q_max; |
---|
28 | } Invertor_params; |
---|
29 | |
---|
30 | void invertor_dealloc(Invertor_params *pars); |
---|
31 | |
---|
32 | void invertor_init(Invertor_params *pars); |
---|
33 | |
---|
34 | |
---|
35 | double pr_sphere(double R, double r); |
---|
36 | double ortho(double d_max, int n, double r); |
---|
37 | double ortho_transformed(double d_max, int n, double q); |
---|
38 | double ortho_derived(double d_max, int n, double r); |
---|
39 | double iq(double *c, double d_max, int n_c, double q); |
---|
40 | double pr(double *c, double d_max, int n_c, double r); |
---|
41 | double dprdr(double *pars, double d_max, int n_c, double r); |
---|
42 | double reg_term(double *pars, double d_max, int n_c, int nslice); |
---|
43 | double int_p2(double *pars, double d_max, int n_c, int nslice); |
---|
44 | void pr_err(double *pars, double *err, double d_max, int n_c, |
---|
45 | double r, double *pr_value, double *pr_value_err); |
---|
46 | int npeaks(double *pars, double d_max, int n_c, int nslice); |
---|
47 | double positive_integral(double *pars, double d_max, int n_c, int nslice); |
---|
48 | double positive_errors(double *pars, double *err, double d_max, int n_c, int nslice); |
---|
49 | |
---|
50 | #endif |
---|