[35aface] | 1 | #if !defined(o_h) |
---|
| 2 | #define refl_h |
---|
| 3 | |
---|
| 4 | /** |
---|
| 5 | * Structure definition for sphere parameters |
---|
| 6 | */ |
---|
| 7 | //[PYTHONCLASS] = ReflModel |
---|
| 8 | //[DISP_PARAMS] = thick_inter0 |
---|
| 9 | //[DESCRIPTION] =<text>Form factor of mutishells normalized by the volume. Here each shell is described |
---|
| 10 | // by an exponential function; |
---|
| 11 | // I) |
---|
| 12 | // For A_shell != 0, |
---|
| 13 | // f(r) = B*exp(A_shell*(r-r_in)/thick_shell)+C |
---|
| 14 | // where |
---|
| 15 | // B=(sld_out-sld_in)/(exp(A_shell)-1) |
---|
| 16 | // C=sld_in-B. |
---|
| 17 | // Note that in the above case, |
---|
| 18 | // the function becomes a linear function |
---|
| 19 | // as A_shell --> 0+ or 0-. |
---|
| 20 | // II) |
---|
| 21 | // For the exact point of A_shell == 0, |
---|
| 22 | // f(r) = sld_in ,i.e., it crosses over flat function |
---|
| 23 | // Note that the 'sld_out' becaomes NULL in this case. |
---|
| 24 | // |
---|
| 25 | // background:background, |
---|
| 26 | // rad_core: radius of sphere(core) |
---|
| 27 | // thick_shell#:the thickness of the shell# |
---|
| 28 | // sld_core: the SLD of the sphere |
---|
| 29 | // sld_solv: the SLD of the solvent |
---|
| 30 | // sld_shell: the SLD of the shell# |
---|
| 31 | // A_shell#: the coefficient in the exponential function |
---|
| 32 | // </text> |
---|
| 33 | //[FIXED]= <text></text> |
---|
| 34 | //[NON_FITTABLE_PARAMS]= <text>n_layers;func_inter0;func_inter1;func_inter2;func_inter3;func_inter4;func_inter5;func_inter5;func_inter7;func_inter8;func_inter9;func_inter10 </text> |
---|
| 35 | //[ORIENTATION_PARAMS]= <text> </text> |
---|
| 36 | |
---|
| 37 | typedef struct { |
---|
| 38 | /// number of layers |
---|
| 39 | // [DEFAULT]=n_layers=1 |
---|
| 40 | int n_layers; |
---|
| 41 | /// Scale factor |
---|
| 42 | // [DEFAULT]=scale= 1.0 |
---|
| 43 | double scale; |
---|
| 44 | /// thick_inter0 [A] |
---|
| 45 | // [DEFAULT]=thick_inter0=1.0 [A] |
---|
| 46 | double thick_inter0; |
---|
| 47 | /// func_inter0 |
---|
| 48 | // [DEFAULT]=func_inter0= 0 |
---|
| 49 | double func_inter0; |
---|
| 50 | /// sld_sub0 [1/A^(2)] |
---|
| 51 | // [DEFAULT]=sld_sub0= 2.07e-6 [1/A^(2)] |
---|
| 52 | double sld_sub0; |
---|
| 53 | /// sld_medium [1/A^(2)] |
---|
| 54 | // [DEFAULT]=sld_medium= 1.0e-6 [1/A^(2)] |
---|
| 55 | double sld_medium; |
---|
| 56 | /// Background |
---|
| 57 | // [DEFAULT]=background=0 |
---|
| 58 | double background; |
---|
| 59 | |
---|
| 60 | // [DEFAULT]=sld_flat1=4.0e-06 [1/A^(2)] |
---|
| 61 | double sld_flat1; |
---|
| 62 | // [DEFAULT]=sld_flat2=3.5e-06 [1/A^(2)] |
---|
| 63 | double sld_flat2; |
---|
| 64 | // [DEFAULT]=sld_flat3=4.0e-06 [1/A^(2)] |
---|
| 65 | double sld_flat3; |
---|
| 66 | // [DEFAULT]=sld_flat4=3.5e-06 [1/A^(2)] |
---|
| 67 | double sld_flat4; |
---|
| 68 | // [DEFAULT]=sld_flat5=4.0e-06 [1/A^(2)] |
---|
| 69 | double sld_flat5; |
---|
| 70 | // [DEFAULT]=sld_flat6=3.5e-06 [1/A^(2)] |
---|
| 71 | double sld_flat6; |
---|
| 72 | // [DEFAULT]=sld_flat7=4.0e-06 [1/A^(2)] |
---|
| 73 | double sld_flat7; |
---|
| 74 | // [DEFAULT]=sld_flat8=3.5e-06 [1/A^(2)] |
---|
| 75 | double sld_flat8; |
---|
| 76 | // [DEFAULT]=sld_flat9=4.0e-06 [1/A^(2)] |
---|
| 77 | double sld_flat9; |
---|
| 78 | // [DEFAULT]=sld_flat10=3.5e-06 [1/A^(2)] |
---|
| 79 | double sld_flat10; |
---|
| 80 | |
---|
| 81 | // [DEFAULT]=thick_inter1=1 [A] |
---|
| 82 | double thick_inter1; |
---|
| 83 | // [DEFAULT]=thick_inter2=1 [A] |
---|
| 84 | double thick_inter2; |
---|
| 85 | // [DEFAULT]=thick_inter3=1 [A] |
---|
| 86 | double thick_inter3; |
---|
| 87 | // [DEFAULT]=thick_inter4=1 [A] |
---|
| 88 | double thick_inter4; |
---|
| 89 | // [DEFAULT]=thick_inter5=1 [A] |
---|
| 90 | double thick_inter5; |
---|
| 91 | // [DEFAULT]=thick_inter6=1 [A] |
---|
| 92 | double thick_inter6; |
---|
| 93 | // [DEFAULT]=thick_inter7=1 [A] |
---|
| 94 | double thick_inter7; |
---|
| 95 | // [DEFAULT]=thick_inter8=1 [A] |
---|
| 96 | double thick_inter8; |
---|
| 97 | // [DEFAULT]=thick_inter9=1 [A] |
---|
| 98 | double thick_inter9; |
---|
| 99 | // [DEFAULT]=thick_inter10=1 [A] |
---|
| 100 | double thick_inter10; |
---|
| 101 | |
---|
| 102 | // [DEFAULT]=thick_flat1=10 [A] |
---|
| 103 | double thick_flat1; |
---|
| 104 | // [DEFAULT]=thick_flat2=100 [A] |
---|
| 105 | double thick_flat2; |
---|
| 106 | // [DEFAULT]=thick_flat3=100 [A] |
---|
| 107 | double thick_flat3; |
---|
| 108 | // [DEFAULT]=thick_flat4=100 [A] |
---|
| 109 | double thick_flat4; |
---|
| 110 | // [DEFAULT]=thick_flat5=100 [A] |
---|
| 111 | double thick_flat5; |
---|
| 112 | // [DEFAULT]=thick_flat6=100 [A] |
---|
| 113 | double thick_flat6; |
---|
| 114 | // [DEFAULT]=thick_flat7=100 [A] |
---|
| 115 | double thick_flat7; |
---|
| 116 | // [DEFAULT]=thick_flat8=100 [A] |
---|
| 117 | double thick_flat8; |
---|
| 118 | // [DEFAULT]=thick_flat9=100 [A] |
---|
| 119 | double thick_flat9; |
---|
| 120 | // [DEFAULT]=thick_flat10=100 [A] |
---|
| 121 | double thick_flat10; |
---|
| 122 | |
---|
| 123 | // [DEFAULT]=func_inter1=0 |
---|
| 124 | double func_inter1; |
---|
| 125 | // [DEFAULT]=func_inter2=0 |
---|
| 126 | double func_inter2; |
---|
| 127 | // [DEFAULT]=func_inter3=0 |
---|
| 128 | double func_inter3; |
---|
| 129 | // [DEFAULT]=func_inter4=0 |
---|
| 130 | double func_inter4; |
---|
| 131 | // [DEFAULT]=func_inter5=0 |
---|
| 132 | double func_inter5; |
---|
| 133 | // [DEFAULT]=func_inter6=0 |
---|
| 134 | double func_inter6; |
---|
| 135 | // [DEFAULT]=func_inter7=0 |
---|
| 136 | double func_inter7; |
---|
| 137 | // [DEFAULT]=func_inter8=0 |
---|
| 138 | double func_inter8; |
---|
| 139 | // [DEFAULT]=func_inter9=0 |
---|
| 140 | double func_inter9; |
---|
| 141 | // [DEFAULT]=func_inter10=0 |
---|
| 142 | double func_inter10; |
---|
| 143 | |
---|
[339ce67] | 144 | // [DEFAULT]=sldIM_flat1=0 |
---|
| 145 | double sldIM_flat1; |
---|
| 146 | // [DEFAULT]=sldIM_flat2=0 |
---|
| 147 | double sldIM_flat2; |
---|
| 148 | // [DEFAULT]=sldIM_flat3=0 |
---|
| 149 | double sldIM_flat3; |
---|
| 150 | // [DEFAULT]=sldIM_flat4=0 |
---|
| 151 | double sldIM_flat4; |
---|
| 152 | // [DEFAULT]=sldIM_flat5=0 |
---|
| 153 | double sldIM_flat5; |
---|
| 154 | // [DEFAULT]=sldIM_flat6=0 |
---|
| 155 | double sldIM_flat6; |
---|
| 156 | // [DEFAULT]=sldIM_flat7=0 |
---|
| 157 | double sldIM_flat7; |
---|
| 158 | // [DEFAULT]=sldIM_flat8=0 |
---|
| 159 | double sldIM_flat8; |
---|
| 160 | // [DEFAULT]=sldIM_flat9=0 |
---|
| 161 | double sldIM_flat9; |
---|
| 162 | // [DEFAULT]=sldIM_flat10=0 |
---|
| 163 | double sldIM_flat10; |
---|
| 164 | // [DEFAULT]=sldIM_sub0=0 |
---|
| 165 | double sldIM_sub0; |
---|
| 166 | // [DEFAULT]=sldIM_medium=0 |
---|
| 167 | double sldIM_medium; |
---|
[35aface] | 168 | |
---|
| 169 | } ReflParameters; |
---|
| 170 | |
---|
| 171 | double re_kernel(double dq[], double q); |
---|
| 172 | |
---|
| 173 | /// 1D scattering function |
---|
| 174 | double refl_analytical_1D(ReflParameters *pars, double q); |
---|
| 175 | |
---|
| 176 | /// 2D scattering function |
---|
| 177 | double refl_analytical_2D(ReflParameters *pars, double q, double phi); |
---|
| 178 | double refl_analytical_2DXY(ReflParameters *pars, double qx, double qy); |
---|
| 179 | |
---|
| 180 | #endif |
---|