Skip to content

Commit 154189b

Browse files
committed
ds
1 parent 2755f8b commit 154189b

File tree

96 files changed

+4501
-7943
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4501
-7943
lines changed

cpp/RAT2/DREAM.cpp

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -63,86 +63,86 @@ namespace RAT
6363
'-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-',
6464
'-', '\n' };
6565

66-
static const char t33_f2[72]{ '-', '-', '-', '-', '-', '-', '-', '-', '-',
66+
static const char t34_f2[72]{ '-', '-', '-', '-', '-', '-', '-', '-', '-',
6767
'-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-',
6868
'-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-',
6969
'-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-',
7070
'-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-',
7171
'-', '-', '\n' };
7272

73-
static const char t14_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
73+
static const char t15_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
7474
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'n', 'P', 'a', 'r', 'a', 'm',
7575
's', ':', ' ' };
7676

77-
static const char t15_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
77+
static const char t16_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
7878
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'n', 'C', 'h', 'a', 'i', 'n',
7979
's', ':', ' ' };
8080

81-
static const char t16_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
81+
static const char t17_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
8282
' ', ' ', ' ', ' ', 'n', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'i', 'o', 'n',
8383
's', ':', ' ' };
8484

85-
static const char t17_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
85+
static const char t18_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
8686
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'p', 'a', 'r', 'a', 'l', 'l', 'e',
8787
'l', ':', ' ' };
8888

89-
static const char t18_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
89+
static const char t19_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
9090
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'C', 'P',
9191
'U', ':', ' ' };
9292

93-
static const char t19_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
93+
static const char t20_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
9494
' ', 'j', 'u', 'm', 'p', 'P', 'r', 'o', 'b', 'a', 'b', 'i', 'l', 'i', 't',
9595
'y', ':', ' ' };
9696

97-
static const char t20_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
97+
static const char t21_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
9898
' ', ' ', ' ', ' ', ' ', ' ', 'p', 'U', 'n', 'i', 't', 'G', 'a', 'm', 'm',
9999
'a', ':', ' ' };
100100

101-
static const char t21_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
101+
static const char t22_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
102102
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'n', 'C',
103103
'R', ':', ' ' };
104104

105-
static const char t22_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
105+
static const char t23_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
106106
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'd', 'e', 'l', 't',
107107
'a', ':', ' ' };
108108

109-
static const char t23_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
109+
static const char t24_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
110110
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 's', 't', 'e', 'p',
111111
's', ':', ' ' };
112112

113-
static const char t24_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
113+
static const char t25_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
114114
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'z', 'e', 't',
115115
'a', ':', ' ' };
116116

117-
static const char t25_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
117+
static const char t26_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
118118
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'o', 'u', 't', 'l', 'i', 'e',
119119
'r', ':', ' ' };
120120

121-
static const char t26_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
121+
static const char t27_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
122122
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'a', 'd', 'a', 'p', 't', 'P', 'C',
123123
'R', ':', ' ' };
124124

125-
static const char t27_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
125+
static const char t28_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
126126
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 't', 'h', 'i', 'n', 'n', 'i', 'n',
127127
'g', ':', ' ' };
128128

129-
static const char t28_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
129+
static const char t29_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
130130
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'A', 'B',
131131
'C', ':', ' ' };
132132

133-
static const char t29_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
133+
static const char t30_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
134134
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'e', 'p', 's', 'i', 'l', 'o',
135135
'n', ':', ' ' };
136136

137-
static const char t30_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
137+
static const char t31_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
138138
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'I',
139139
'O', ':', ' ' };
140140

141-
static const char t31_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
141+
static const char t32_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
142142
' ', ' ', ' ', ' ', ' ', 's', 't', 'o', 'r', 'e', 'O', 'u', 't', 'p', 'u',
143143
't', ':', ' ' };
144144

145-
static const char t32_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
145+
static const char t33_f2[27]{ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
146146
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
147147
'R', ':', ' ' };
148148

@@ -183,7 +183,7 @@ namespace RAT
183183
::coder::array<char, 2U> r;
184184
::coder::array<char, 2U> r_f1;
185185
::coder::array<char, 2U> s_f1;
186-
::coder::array<char, 2U> t14_f1;
186+
::coder::array<char, 2U> t15_f1;
187187
::coder::array<char, 2U> t_f1;
188188
::coder::array<char, 2U> u_f1;
189189
::coder::array<char, 2U> v_f1;
@@ -195,9 +195,9 @@ namespace RAT
195195
int i;
196196

197197
// Print the dream parameters
198-
t14_f1.set_size(1, 72);
198+
t15_f1.set_size(1, 72);
199199
for (i = 0; i < 72; i++) {
200-
t14_f1[i] = b_cv[i];
200+
t15_f1[i] = b_cv[i];
201201
}
202202

203203
f1.set_size(1, 5);
@@ -214,71 +214,71 @@ namespace RAT
214214
bools[0].f1 = f1;
215215
bools[1].f1 = b_f1;
216216
c_f1.reserve(100);
217-
coder::strjoin(t14_f1, t14_f2, (char *)c_f1.data(), iv);
217+
coder::strjoin(t15_f1, t15_f2, (char *)c_f1.data(), iv);
218218
(*(int (*)[2])c_f1.size())[0] = iv[0];
219219
(*(int (*)[2])c_f1.size())[1] = iv[1];
220220
coder::c_snPrint(DREAMPar.nParams, d_f1);
221221
rv[0].f1 = c_f1;
222222
rv[1].f1 = d_f1;
223223
coder::strjoin(rv, r);
224-
coder::strjoin(r, t15_f2, e_f1);
224+
coder::strjoin(r, t16_f2, e_f1);
225225
coder::c_snPrint(DREAMPar.nChains, f_f1);
226226
rv[0].f1 = e_f1;
227227
rv[1].f1 = f_f1;
228228
coder::strjoin(rv, r);
229-
coder::strjoin(r, t16_f2, g_f1);
229+
coder::strjoin(r, t17_f2, g_f1);
230230
coder::c_snPrint(DREAMPar.nGenerations, h_f1);
231231
rv[0].f1 = g_f1;
232232
rv[1].f1 = h_f1;
233233
coder::strjoin(rv, r);
234-
coder::strjoin(r, t17_f2, i_f1);
234+
coder::strjoin(r, t18_f2, i_f1);
235235
iv[0] = (*(int (*)[2])f1.size())[0];
236236
iv[1] = (*(int (*)[2])f1.size())[1];
237237
coder::e_sprintf((const char *)f1.data(), iv, j_f1);
238238
rv[0].f1 = i_f1;
239239
rv[1].f1 = j_f1;
240240
coder::strjoin(rv, r);
241-
coder::strjoin(r, t18_f2, k_f1);
241+
coder::strjoin(r, t19_f2, k_f1);
242242
coder::c_snPrint(1.0, l_f1);
243243
rv[0].f1 = k_f1;
244244
rv[1].f1 = l_f1;
245245
coder::strjoin(rv, r);
246-
coder::strjoin(r, t19_f2, m_f1);
246+
coder::strjoin(r, t20_f2, m_f1);
247247
coder::c_snPrint(DREAMPar.jumpProbability, n_f1);
248248
rv[0].f1 = m_f1;
249249
rv[1].f1 = n_f1;
250250
coder::strjoin(rv, r);
251-
coder::strjoin(r, t20_f2, o_f1);
251+
coder::strjoin(r, t21_f2, o_f1);
252252
coder::c_snPrint(DREAMPar.pUnitGamma, p_f1);
253253
rv[0].f1 = o_f1;
254254
rv[1].f1 = p_f1;
255255
coder::strjoin(rv, r);
256-
coder::strjoin(r, t21_f2, q_f1);
256+
coder::strjoin(r, t22_f2, q_f1);
257257
coder::c_snPrint(3.0, r_f1);
258258
rv[0].f1 = q_f1;
259259
rv[1].f1 = r_f1;
260260
coder::strjoin(rv, r);
261-
coder::strjoin(r, t22_f2, s_f1);
261+
coder::strjoin(r, t23_f2, s_f1);
262262
coder::c_snPrint(3.0, t_f1);
263263
rv[0].f1 = s_f1;
264264
rv[1].f1 = t_f1;
265265
coder::strjoin(rv, r);
266-
coder::strjoin(r, t23_f2, u_f1);
266+
coder::strjoin(r, t24_f2, u_f1);
267267
coder::c_snPrint(DREAMPar.steps, v_f1);
268268
rv[0].f1 = u_f1;
269269
rv[1].f1 = v_f1;
270270
coder::strjoin(rv, r);
271-
coder::strjoin(r, t24_f2, w_f1);
271+
coder::strjoin(r, t25_f2, w_f1);
272272
coder::c_snPrint(1.0E-12, x_f1);
273273
rv[0].f1 = w_f1;
274274
rv[1].f1 = x_f1;
275275
coder::strjoin(rv, r);
276-
coder::strjoin(r, t25_f2, y_f1);
276+
coder::strjoin(r, t26_f2, y_f1);
277277
coder::b_sprintf(DREAMPar.outlier, ab_f1);
278278
rv[0].f1 = y_f1;
279279
rv[1].f1 = ab_f1;
280280
coder::strjoin(rv, r);
281-
coder::strjoin(r, t26_f2, bb_f1);
281+
coder::strjoin(r, t27_f2, bb_f1);
282282
iv[0] = (*(int (*)[2])bools[static_cast<int>(DREAMPar.adaptPCR)].f1.size())
283283
[0];
284284
iv[1] = (*(int (*)[2])bools[static_cast<int>(DREAMPar.adaptPCR)].f1.size())
@@ -288,54 +288,54 @@ namespace RAT
288288
rv[0].f1 = bb_f1;
289289
rv[1].f1 = cb_f1;
290290
coder::strjoin(rv, r);
291-
coder::strjoin(r, t27_f2, db_f1);
291+
coder::strjoin(r, t28_f2, db_f1);
292292
coder::c_snPrint(1.0, eb_f1);
293293
rv[0].f1 = db_f1;
294294
rv[1].f1 = eb_f1;
295295
coder::strjoin(rv, r);
296-
coder::strjoin(r, t28_f2, fb_f1);
296+
coder::strjoin(r, t29_f2, fb_f1);
297297
iv[0] = (*(int (*)[2])f1.size())[0];
298298
iv[1] = (*(int (*)[2])f1.size())[1];
299299
coder::e_sprintf((const char *)f1.data(), iv, gb_f1);
300300
rv[0].f1 = fb_f1;
301301
rv[1].f1 = gb_f1;
302302
coder::strjoin(rv, r);
303-
coder::strjoin(r, t29_f2, hb_f1);
303+
coder::strjoin(r, t30_f2, hb_f1);
304304
coder::c_snPrint(0.025, ib_f1);
305305
rv[0].f1 = hb_f1;
306306
rv[1].f1 = ib_f1;
307307
coder::strjoin(rv, r);
308-
coder::strjoin(r, t30_f2, jb_f1);
308+
coder::strjoin(r, t31_f2, jb_f1);
309309
iv[0] = (*(int (*)[2])f1.size())[0];
310310
iv[1] = (*(int (*)[2])f1.size())[1];
311311
coder::e_sprintf((const char *)f1.data(), iv, kb_f1);
312312
rv[0].f1 = jb_f1;
313313
rv[1].f1 = kb_f1;
314314
coder::strjoin(rv, r);
315-
coder::strjoin(r, t31_f2, lb_f1);
315+
coder::strjoin(r, t32_f2, lb_f1);
316316
iv[0] = (*(int (*)[2])f1.size())[0];
317317
iv[1] = (*(int (*)[2])f1.size())[1];
318318
coder::e_sprintf((const char *)f1.data(), iv, mb_f1);
319319
rv[0].f1 = lb_f1;
320320
rv[1].f1 = mb_f1;
321321
coder::strjoin(rv, r);
322-
coder::strjoin(r, t32_f2, nb_f1);
322+
coder::strjoin(r, t33_f2, nb_f1);
323323
i = DREAMPar.R.size(0) * DREAMPar.R.size(1);
324324
if (i != 1) {
325325
coder::snPrint(static_cast<double>(static_cast<short>(DREAMPar.R.size(0))),
326326
static_cast<double>(static_cast<short>(DREAMPar.R.size(1))),
327327
ob_f1);
328328
rv[0].f1 = nb_f1;
329329
rv[1].f1 = ob_f1;
330-
coder::strjoin(rv, t14_f1);
330+
coder::strjoin(rv, t15_f1);
331331
} else {
332332
coder::c_snPrint(DREAMPar.R[0], ob_f1);
333333
rv[0].f1 = nb_f1;
334334
rv[1].f1 = ob_f1;
335-
coder::strjoin(rv, t14_f1);
335+
coder::strjoin(rv, t15_f1);
336336
}
337337

338-
coder::b_strjoin(t14_f1, t33_f2, r);
338+
coder::b_strjoin(t15_f1, t34_f2, r);
339339
triggerEvent(r);
340340
}
341341

cpp/RAT2/DREAMWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace RAT
2525
*ratInputs_controls)
2626
{
2727
ProblemDefinition problemStruct;
28-
Results expl_temp;
28+
b_struct_T expl_temp;
2929
int loop_ub;
3030

3131
// Calculate the log-likelihood for a set of parameters.
@@ -56,7 +56,7 @@ namespace RAT
5656
unpackParams(problemStruct);
5757

5858
// Calculate....
59-
b_reflectivityCalculation(problemStruct, ratInputs_controls, &expl_temp);
59+
b_reflectivityCalculation(problemStruct, ratInputs_controls, expl_temp);
6060

6161
// Function value is chi-squared....
6262
return -0.5 * expl_temp.calculationResults.sumChi;

0 commit comments

Comments
 (0)