49 Type(cambparams) ,
intent(in) :: P
51 integer ,
intent(out) :: num_param
58 if ( fp%fisher_par%want_ombh2 ) num_param = num_param + 1
59 if ( fp%fisher_par%want_omch2 ) num_param = num_param + 1
60 if ( fp%fisher_par%want_omnuh2 ) num_param = num_param + 1
61 if ( fp%fisher_par%want_hubble ) num_param = num_param + 1
62 if ( fp%fisher_par%want_helium_fraction ) num_param = num_param + 1
63 if ( fp%fisher_par%want_massless ) num_param = num_param + 1
65 if ( fp%fisher_par%want_scalar_amp ) num_param = num_param + 1
66 if ( fp%fisher_par%want_scalar_spectral_index ) num_param = num_param + 1
67 if ( fp%fisher_par%want_scalar_nrun ) num_param = num_param + 1
68 if ( fp%fisher_par%want_tensor_spectral_index ) num_param = num_param + 1
69 if ( fp%fisher_par%want_initial_ratio ) num_param = num_param + 1
71 if ( fp%fisher_par%want_re_optical_depth ) num_param = num_param + 1
75 if ( fp%fisher_par%want_bias )
then
76 do i = 1, num_redshiftwindows
77 if ( redshift_w(i)%kind == window_counts )
then
78 num_param = num_param + 1
83 if ( fp%fisher_par%want_alpha_SN ) num_param = num_param + 1
84 if ( fp%fisher_par%want_beta_SN ) num_param = num_param + 1
85 if ( fp%fisher_par%want_M0_SN ) num_param = num_param + 1
87 #ifdef COSMICFISH_CAMB
89 if ( fp%fisher_par%want_w0_ppf ) num_param = num_param + 1
90 if ( fp%fisher_par%want_wa_ppf ) num_param = num_param + 1
91 if ( fp%fisher_par%want_cs_ppf ) num_param = num_param + 1
94 #ifdef COSMICFISH_EFTCAMB
97 if ( ( p%EFTflag == 1 .or. p%EFTflag == 2 .or. p%EFTflag == 3 ) .and. p%EFTwDE /= 0 )
then
98 if ( p%EFTwDE == 1 )
then
99 num_param = num_param + 1
100 else if ( p%EFTwDE == 2 )
then
101 num_param = num_param + 2
102 else if ( p%EFTwDE == 3 )
then
103 num_param = num_param + 3
104 else if ( p%EFTwDE == 4 )
then
105 num_param = num_param + 3
106 else if ( p%EFTwDE == 5 )
then
107 num_param = num_param + 4
108 else if ( p%EFTwDE == 6 )
then
109 num_param = num_param + 1
113 if ( p%EFTflag == 1 )
then
115 if ( p%PureEFTmodelOmega == 1 )
then
116 num_param = num_param + 1
117 else if ( p%PureEFTmodelOmega == 2 )
then
118 num_param = num_param + 1
119 else if ( p%PureEFTmodelOmega == 3 )
then
120 num_param = num_param + 2
121 else if ( p%PureEFTmodelOmega == 4 )
then
122 num_param = num_param + 2
123 else if ( p%PureEFTmodelOmega == 5 )
then
124 num_param = num_param + 1
127 if ( p%PureEFTmodelGamma1 == 1 )
then
128 num_param = num_param + 1
129 else if ( p%PureEFTmodelGamma1 == 2 )
then
130 num_param = num_param + 1
131 else if ( p%PureEFTmodelGamma1 == 3 )
then
132 num_param = num_param + 2
133 else if ( p%PureEFTmodelGamma1 == 4 )
then
134 num_param = num_param + 2
135 else if ( p%PureEFTmodelGamma1 == 5 )
then
136 num_param = num_param + 1
139 if ( p%PureEFTmodelGamma2 == 1 )
then
140 num_param = num_param + 1
141 else if ( p%PureEFTmodelGamma2 == 2 )
then
142 num_param = num_param + 1
143 else if ( p%PureEFTmodelGamma2 == 3 )
then
144 num_param = num_param + 2
145 else if ( p%PureEFTmodelGamma2 == 4 )
then
146 num_param = num_param + 2
147 else if ( p%PureEFTmodelGamma2 == 5 )
then
148 num_param = num_param + 1
151 if ( p%PureEFTmodelGamma3 == 1 )
then
152 num_param = num_param + 1
153 else if ( p%PureEFTmodelGamma3 == 2 )
then
154 num_param = num_param + 1
155 else if ( p%PureEFTmodelGamma3 == 3 )
then
156 num_param = num_param + 2
157 else if ( p%PureEFTmodelGamma3 == 4 )
then
158 num_param = num_param + 2
159 else if ( p%PureEFTmodelGamma3 == 5 )
then
160 num_param = num_param + 1
163 if ( p%PureEFTmodelGamma4 == 1 )
then
164 num_param = num_param + 1
165 else if ( p%PureEFTmodelGamma4 == 2 )
then
166 num_param = num_param + 1
167 else if ( p%PureEFTmodelGamma4 == 3 )
then
168 num_param = num_param + 2
169 else if ( p%PureEFTmodelGamma4 == 4 )
then
170 num_param = num_param + 2
171 else if ( p%PureEFTmodelGamma4 == 5 )
then
172 num_param = num_param + 1
175 if ( p%PureEFTmodelGamma5 == 1 )
then
176 num_param = num_param + 1
177 else if ( p%PureEFTmodelGamma5 == 2 )
then
178 num_param = num_param + 1
179 else if ( p%PureEFTmodelGamma5 == 3 )
then
180 num_param = num_param + 2
181 else if ( p%PureEFTmodelGamma5 == 4 )
then
182 num_param = num_param + 2
183 else if ( p%PureEFTmodelGamma5 == 5 )
then
184 num_param = num_param + 1
187 if ( p%PureEFTmodelGamma6 == 1 )
then
188 num_param = num_param + 1
189 else if ( p%PureEFTmodelGamma6 == 2 )
then
190 num_param = num_param + 1
191 else if ( p%PureEFTmodelGamma6 == 3 )
then
192 num_param = num_param + 2
193 else if ( p%PureEFTmodelGamma6 == 4 )
then
194 num_param = num_param + 2
195 else if ( p%PureEFTmodelGamma6 == 5 )
then
196 num_param = num_param + 1
198 else if ( p%EFTflag == 2 )
then
199 if ( p%DesignerEFTmodel == 1 )
then
200 num_param = num_param + 1
201 else if ( p%DesignerEFTmodel == 2 )
then
202 num_param = num_param + 0
204 else if ( p%EFTflag == 3 )
then
205 if ( p%AltParEFTmodel == 1 )
then
206 if ( p%RPHmassPmodel == 1 )
then
207 num_param = num_param + 1
208 else if ( p%RPHmassPmodel == 2 )
then
209 num_param = num_param + 2
211 if ( p%RPHkineticitymodel == 1 )
then
212 num_param = num_param + 1
213 else if ( p%RPHkineticitymodel == 2 )
then
214 num_param = num_param + 2
216 if ( p%RPHbraidingmodel == 1 )
then
217 num_param = num_param + 1
218 else if ( p%RPHbraidingmodel == 2 )
then
219 num_param = num_param + 2
221 if ( p%RPHtensormodel == 1 )
then
222 num_param = num_param + 1
223 else if ( p%RPHtensormodel == 2 )
then
224 num_param = num_param + 2
227 else if ( p%EFTflag == 4 )
then
228 if ( p%FullMappingEFTmodel == 1 )
then
229 if ( p%HoravaSolarSystem .eqv. .true. )
then
230 num_param = num_param + 2
232 num_param = num_param + 3
238 #ifdef COSMICFISH_MGCAMB
239 if ( p%MGC_model == 1 )
then
240 num_param = num_param + 5
241 else if ( p%MGC_model == 2 )
then
242 num_param = num_param + 2
243 else if ( p%MGC_model == 3 )
then
244 num_param = num_param + 3
245 else if ( p%MGC_model == 4 )
then
246 num_param = num_param + 1
247 else if ( p%MGC_model ==5 )
then
248 num_param = num_param + 3
249 else if ( p%MGC_model ==6 )
then
250 num_param = num_param + 1
251 else if ( p%MGC_model == 7 )
then
252 num_param = num_param + 3
253 else if ( p%MGC_model == 8 )
then
254 num_param = num_param + 4
255 else if ( p%MGC_model == 9 )
then
256 num_param = num_param + 2
257 else if ( p%MGC_model ==10 )
then
258 num_param = num_param + 2
270 Type(cambparams) ,
intent(in) :: P
272 integer ,
intent(in) :: param_number
273 character(*) ,
intent(out) :: param_name
274 character(*) ,
intent(out),
optional :: param_name_latex
276 integer :: i, num_param
277 character(len=20) str
282 if ( fp%fisher_par%want_ombh2 ) num_param = num_param + 1
283 if ( num_param == param_number ) then; param_name =
'omegabh2';
if (
present(param_name_latex) ) param_name_latex =
'\Omega_b h^2';
return ;
286 if ( fp%fisher_par%want_omch2 ) num_param = num_param + 1
287 if ( num_param == param_number ) then; param_name =
'omegach2';
if (
present(param_name_latex) ) param_name_latex =
'\Omega_c h^2';
return ;
290 if ( fp%fisher_par%want_omnuh2 ) num_param = num_param + 1
291 if ( num_param == param_number ) then; param_name =
'omeganuh2';
if (
present(param_name_latex) ) param_name_latex =
'\Omega_\nu h^2';
return ;
294 if ( fp%fisher_par%want_hubble ) num_param = num_param + 1
295 if ( num_param == param_number ) then; param_name =
'h';
if (
present(param_name_latex) ) param_name_latex =
'h';
return ;
298 if ( fp%fisher_par%want_helium_fraction ) num_param = num_param + 1
299 if ( num_param == param_number ) then; param_name =
'yhe';
if (
present(param_name_latex) ) param_name_latex =
'Y_{He}';
return ;
302 if ( fp%fisher_par%want_massless ) num_param = num_param + 1
303 if ( num_param == param_number ) then; param_name =
'numless';
if (
present(param_name_latex) ) param_name_latex =
'\nu_{mless}';
return ;
307 if ( fp%fisher_par%want_scalar_amp ) num_param = num_param + 1
308 if ( num_param == param_number ) then; param_name =
'logA';
if (
present(param_name_latex) ) param_name_latex =
'{\rm{ln}}(10^{10} A_s)';
return ;
311 if ( fp%fisher_par%want_scalar_spectral_index ) num_param = num_param + 1
312 if ( num_param == param_number ) then; param_name =
'ns';
if (
present(param_name_latex) ) param_name_latex =
'n_s';
return ;
315 if ( fp%fisher_par%want_scalar_nrun ) num_param = num_param + 1
316 if ( num_param == param_number ) then; param_name =
'nrun';
if (
present(param_name_latex) ) param_name_latex =
'n_{\rm run}';
return ;
319 if ( fp%fisher_par%want_tensor_spectral_index ) num_param = num_param + 1
320 if ( num_param == param_number ) then; param_name =
'nt';
if (
present(param_name_latex) ) param_name_latex =
'n_t';
return ;
323 if ( fp%fisher_par%want_initial_ratio ) num_param = num_param + 1
324 if ( num_param == param_number ) then; param_name =
'r';
if (
present(param_name_latex) ) param_name_latex =
'r';
return ;
328 if ( fp%fisher_par%want_re_optical_depth ) num_param = num_param + 1
329 if ( num_param == param_number ) then; param_name =
'tau';
if (
present(param_name_latex) ) param_name_latex =
'\tau';
return ;
334 if ( fp%fisher_par%want_bias )
then
335 do i = 1, num_redshiftwindows
336 if ( redshift_w(i)%kind == window_counts )
then
337 num_param = num_param + 1
340 if ( num_param == param_number ) then; param_name =
'Bias_W_'//trim(str) ;
if (
present(param_name_latex) ) param_name_latex =
'b_{'//trim(str)//
'}';
return ;
347 if ( fp%fisher_par%want_alpha_SN ) num_param = num_param + 1
348 if ( num_param == param_number ) then; param_name =
'alpha_SN';
if (
present(param_name_latex) ) param_name_latex =
'\alpha_{\rm SN}';
return ;
350 if ( fp%fisher_par%want_beta_SN ) num_param = num_param + 1
351 if ( num_param == param_number ) then; param_name =
'beta_SN';
if (
present(param_name_latex) ) param_name_latex =
'\beta_{\rm SN}';
return ;
353 if ( fp%fisher_par%want_M0_SN ) num_param = num_param + 1
354 if ( num_param == param_number ) then; param_name =
'M0_SN';
if (
present(param_name_latex) ) param_name_latex =
'M_0^{\rm SN}';
return ;
357 #ifdef COSMICFISH_CAMB
359 if ( fp%fisher_par%want_w0_ppf ) num_param = num_param + 1
360 if ( num_param == param_number ) then; param_name =
'w0_ppf';
if (
present(param_name_latex) ) param_name_latex =
'w_{0}^{\rm ppf}';
return ;
362 if ( fp%fisher_par%want_wa_ppf ) num_param = num_param + 1
363 if ( num_param == param_number ) then; param_name =
'wa_ppf';
if (
present(param_name_latex) ) param_name_latex =
'w_{a}^{\rm ppf}';
return ;
365 if ( fp%fisher_par%want_cs_ppf ) num_param = num_param + 1
366 if ( num_param == param_number ) then; param_name =
'cs_ppf';
if (
present(param_name_latex) ) param_name_latex =
'c_{s}^{\rm ppf}';
return ;
370 #ifdef COSMICFISH_EFTCAMB
373 if ( ( p%EFTflag == 1 .or. p%EFTflag == 2 .or. p%EFTflag == 3 ) .and. p%EFTwDE /= 0 )
then
374 if ( p%EFTwDE == 1 )
then
375 num_param = num_param + 1
376 if ( num_param == param_number ) then; param_name =
'EFTw0' ;
if (
present(param_name_latex) ) param_name_latex =
'w_0';
return ;
378 else if ( p%EFTwDE == 2 )
then
379 num_param = num_param + 1
380 if ( num_param == param_number ) then; param_name =
'EFTw0' ;
if (
present(param_name_latex) ) param_name_latex =
'w_0';
return ;
382 num_param = num_param + 1
383 if ( num_param == param_number ) then; param_name =
'EFTwa' ;
if (
present(param_name_latex) ) param_name_latex =
'w_a';
return ;
385 else if ( p%EFTwDE == 3 )
then
386 num_param = num_param + 1
387 if ( num_param == param_number ) then; param_name =
'EFTw0' ;
if (
present(param_name_latex) ) param_name_latex =
'w_0';
return ;
389 num_param = num_param + 1
390 if ( num_param == param_number ) then; param_name =
'EFTwa' ;
if (
present(param_name_latex) ) param_name_latex =
'w_a';
return ;
392 num_param = num_param + 1
393 if ( num_param == param_number ) then; param_name =
'EFTwn' ;
if (
present(param_name_latex) ) param_name_latex =
'w_n';
return ;
395 else if ( p%EFTwDE == 4 )
then
396 num_param = num_param + 1
397 if ( num_param == param_number ) then; param_name =
'EFTw0' ;
if (
present(param_name_latex) ) param_name_latex =
'w_0';
return ;
399 num_param = num_param + 1
400 if ( num_param == param_number ) then; param_name =
'EFTwa' ;
if (
present(param_name_latex) ) param_name_latex =
'w_a';
return ;
402 num_param = num_param + 1
403 if ( num_param == param_number ) then; param_name =
'EFTwat' ;
if (
present(param_name_latex) ) param_name_latex =
'wa_t';
return ;
405 else if ( p%EFTwDE == 5 )
then
406 num_param = num_param + 1
407 if ( num_param == param_number ) then; param_name =
'EFTw0' ;
if (
present(param_name_latex) ) param_name_latex =
'w_0';
return ;
409 num_param = num_param + 1
410 if ( num_param == param_number ) then; param_name =
'EFTwa' ;
if (
present(param_name_latex) ) param_name_latex =
'w_a';
return ;
412 num_param = num_param + 1
413 if ( num_param == param_number ) then; param_name =
'EFTw2' ;
if (
present(param_name_latex) ) param_name_latex =
'w_2';
return ;
415 num_param = num_param + 1
416 if ( num_param == param_number ) then; param_name =
'EFTw3' ;
if (
present(param_name_latex) ) param_name_latex =
'w_3';
return ;
418 else if ( p%EFTwDE == 6 )
then
424 if ( p%EFTflag == 1 )
then
426 if ( p%PureEFTmodelOmega == 1 )
then
427 num_param = num_param + 1
428 if ( num_param == param_number ) then; param_name =
'EFTOmega0' ;
if (
present(param_name_latex) ) param_name_latex =
'\Omega_0^{\rm EFT}';
return ;
430 else if ( p%PureEFTmodelOmega == 2 )
then
431 num_param = num_param + 1
432 if ( num_param == param_number ) then; param_name =
'EFTOmega0' ;
if (
present(param_name_latex) ) param_name_latex =
'\Omega_0^{\rm EFT}';
return ;
434 else if ( p%PureEFTmodelOmega == 3 )
then
435 num_param = num_param + 1
436 if ( num_param == param_number ) then; param_name =
'EFTOmega0' ;
if (
present(param_name_latex) ) param_name_latex =
'\Omega_0^{\rm EFT}';
return ;
438 num_param = num_param + 1
439 if ( num_param == param_number ) then; param_name =
'EFTOmegaExp' ;
if (
present(param_name_latex) ) param_name_latex =
'n^{\rm EFT}';
return ;
441 else if ( p%PureEFTmodelOmega == 4 )
then
442 num_param = num_param + 1
443 if ( num_param == param_number ) then; param_name =
'EFTOmega0' ;
if (
present(param_name_latex) ) param_name_latex =
'\Omega_0^{\rm EFT}';
return ;
445 num_param = num_param + 1
446 if ( num_param == param_number ) then; param_name =
'EFTOmegaExp' ;
if (
present(param_name_latex) ) param_name_latex =
'n^{\rm EFT}';
return ;
448 else if ( p%PureEFTmodelOmega == 5 )
then
452 if ( p%PureEFTmodelGamma1 == 1 )
then
453 num_param = num_param + 1
454 if ( num_param == param_number ) then; param_name =
'EFTGamma10' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(1) {\rm EFT}}';
return ;
456 else if ( p%PureEFTmodelGamma1 == 2 )
then
457 num_param = num_param + 1
458 if ( num_param == param_number ) then; param_name =
'EFTGamma10' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(1) {\rm EFT}}';
return ;
460 else if ( p%PureEFTmodelGamma1 == 3 )
then
461 num_param = num_param + 1
462 if ( num_param == param_number ) then; param_name =
'EFTGamma10' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(1) {\rm EFT}}';
return ;
464 num_param = num_param + 1
465 if ( num_param == param_number ) then; param_name =
'EFTGamma1Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(1) {\rm EFT}}';
return ;
467 else if ( p%PureEFTmodelGamma1 == 4 )
then
468 num_param = num_param + 1
469 if ( num_param == param_number ) then; param_name =
'EFTGamma10' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(1) {\rm EFT}}';
return ;
471 num_param = num_param + 1
472 if ( num_param == param_number ) then; param_name =
'EFTGamma1Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(1) {\rm EFT}}';
return ;
474 else if ( p%PureEFTmodelGamma1 == 5 )
then
478 if ( p%PureEFTmodelGamma2 == 1 )
then
479 num_param = num_param + 1
480 if ( num_param == param_number ) then; param_name =
'EFTGamma20' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(2) {\rm EFT}}';
return ;
482 else if ( p%PureEFTmodelGamma2 == 2 )
then
483 num_param = num_param + 1
484 if ( num_param == param_number ) then; param_name =
'EFTGamma20' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(2) {\rm EFT}}';
return ;
486 else if ( p%PureEFTmodelGamma2 == 3 )
then
487 num_param = num_param + 1
488 if ( num_param == param_number ) then; param_name =
'EFTGamma20' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(2) {\rm EFT}}';
return ;
490 num_param = num_param + 1
491 if ( num_param == param_number ) then; param_name =
'EFTGamma2Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(2) {\rm EFT}}';
return ;
493 else if ( p%PureEFTmodelGamma2 == 4 )
then
494 num_param = num_param + 1
495 if ( num_param == param_number ) then; param_name =
'EFTGamma20' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(2) {\rm EFT}}';
return ;
497 num_param = num_param + 1
498 if ( num_param == param_number ) then; param_name =
'EFTGamma2Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(2) {\rm EFT}}';
return ;
500 else if ( p%PureEFTmodelGamma2 == 5 )
then
504 if ( p%PureEFTmodelGamma3 == 1 )
then
505 num_param = num_param + 1
506 if ( num_param == param_number ) then; param_name =
'EFTGamma30' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(3) {\rm EFT}}';
return ;
508 else if ( p%PureEFTmodelGamma3 == 2 )
then
509 num_param = num_param + 1
510 if ( num_param == param_number ) then; param_name =
'EFTGamma30' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(3) {\rm EFT}}';
return ;
512 else if ( p%PureEFTmodelGamma3 == 3 )
then
513 num_param = num_param + 1
514 if ( num_param == param_number ) then; param_name =
'EFTGamma30' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(3) {\rm EFT}}';
return ;
516 num_param = num_param + 1
517 if ( num_param == param_number ) then; param_name =
'EFTGamma3Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(3) {\rm EFT}}';
return ;
519 else if ( p%PureEFTmodelGamma3 == 4 )
then
520 num_param = num_param + 1
521 if ( num_param == param_number ) then; param_name =
'EFTGamma30' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(3) {\rm EFT}}';
return ;
523 num_param = num_param + 1
524 if ( num_param == param_number ) then; param_name =
'EFTGamma3Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(3) {\rm EFT}}';
return ;
526 else if ( p%PureEFTmodelGamma3 == 5 )
then
530 if ( p%PureEFTmodelGamma4 == 1 )
then
531 num_param = num_param + 1
532 if ( num_param == param_number ) then; param_name =
'EFTGamma40' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(4) {\rm EFT}}';
return ;
534 else if ( p%PureEFTmodelGamma4 == 2 )
then
535 num_param = num_param + 1
536 if ( num_param == param_number ) then; param_name =
'EFTGamma40' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(4) {\rm EFT}}';
return ;
538 else if ( p%PureEFTmodelGamma4 == 3 )
then
539 num_param = num_param + 1
540 if ( num_param == param_number ) then; param_name =
'EFTGamma40' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(4) {\rm EFT}}';
return ;
542 num_param = num_param + 1
543 if ( num_param == param_number ) then; param_name =
'EFTGamma4Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(4) {\rm EFT}}';
return ;
545 else if ( p%PureEFTmodelGamma4 == 4 )
then
546 num_param = num_param + 1
547 if ( num_param == param_number ) then; param_name =
'EFTGamma40' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(4) {\rm EFT}}';
return ;
549 num_param = num_param + 1
550 if ( num_param == param_number ) then; param_name =
'EFTGamma4Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(4) {\rm EFT}}';
return ;
552 else if ( p%PureEFTmodelGamma4 == 5 )
then
556 if ( p%PureEFTmodelGamma5 == 1 )
then
557 num_param = num_param + 1
558 if ( num_param == param_number ) then; param_name =
'EFTGamma50' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(5) {\rm EFT}}';
return ;
560 else if ( p%PureEFTmodelGamma5 == 2 )
then
561 num_param = num_param + 1
562 if ( num_param == param_number ) then; param_name =
'EFTGamma50' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(5) {\rm EFT}}';
return ;
564 else if ( p%PureEFTmodelGamma5 == 3 )
then
565 num_param = num_param + 1
566 if ( num_param == param_number ) then; param_name =
'EFTGamma50' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(5) {\rm EFT}}';
return ;
568 num_param = num_param + 1
569 if ( num_param == param_number ) then; param_name =
'EFTGamma5Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(5) {\rm EFT}}';
return ;
571 else if ( p%PureEFTmodelGamma5 == 4 )
then
572 num_param = num_param + 1
573 if ( num_param == param_number ) then; param_name =
'EFTGamma50' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(5) {\rm EFT}}';
return ;
575 num_param = num_param + 1
576 if ( num_param == param_number ) then; param_name =
'EFTGamma5Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(5) {\rm EFT}}';
return ;
578 else if ( p%PureEFTmodelGamma5 == 5 )
then
582 if ( p%PureEFTmodelGamma6 == 1 )
then
583 num_param = num_param + 1
584 if ( num_param == param_number ) then; param_name =
'EFTGamma60' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(6) {\rm EFT}}';
return ;
586 else if ( p%PureEFTmodelGamma6 == 2 )
then
587 num_param = num_param + 1
588 if ( num_param == param_number ) then; param_name =
'EFTGamma60' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(6) {\rm EFT}}';
return ;
590 else if ( p%PureEFTmodelGamma6 == 3 )
then
591 num_param = num_param + 1
592 if ( num_param == param_number ) then; param_name =
'EFTGamma60' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(6) {\rm EFT}}';
return ;
594 num_param = num_param + 1
595 if ( num_param == param_number ) then; param_name =
'EFTGamma6Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(6) {\rm EFT}}';
return ;
597 else if ( p%PureEFTmodelGamma6 == 4 )
then
598 num_param = num_param + 1
599 if ( num_param == param_number ) then; param_name =
'EFTGamma60' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_0^{(6) {\rm EFT}}';
return ;
601 num_param = num_param + 1
602 if ( num_param == param_number ) then; param_name =
'EFTGamma6Exp' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm exp}^{(6) {\rm EFT}}';
return ;
604 else if ( p%PureEFTmodelGamma6 == 5 )
then
607 else if ( p%EFTflag == 2 )
then
608 if ( p%DesignerEFTmodel == 1 )
then
609 num_param = num_param + 1
610 if ( num_param == param_number ) then; param_name =
'B0' ;
if (
present(param_name_latex) ) param_name_latex =
'B_0';
return ;
612 else if ( p%DesignerEFTmodel == 2 )
then
613 num_param = num_param + 0
615 else if ( p%EFTflag == 3 )
then
616 if ( p%AltParEFTmodel == 1 )
then
617 if ( p%RPHmassPmodel == 1 )
then
618 num_param = num_param + 1
619 if ( num_param == param_number ) then; param_name =
'RPHmassP0' ;
if (
present(param_name_latex) ) param_name_latex =
'\tilde{M_0}';
return ;
621 else if ( p%RPHmassPmodel == 2 )
then
622 num_param = num_param + 1
623 if ( num_param == param_number ) then; param_name =
'RPHmassP0' ;
if (
present(param_name_latex) ) param_name_latex =
'\tilde{M_0}';
return ;
625 num_param = num_param + 1
626 if ( num_param == param_number ) then; param_name =
'RPHmassPexp' ;
if (
present(param_name_latex) ) param_name_latex =
'\tilde{M}_{\rm exp}^{\rm RPH}';
return ;
629 if ( p%RPHkineticitymodel == 1 )
then
630 num_param = num_param + 1
631 if ( num_param == param_number ) then; param_name =
'RPHkineticity0' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_0^{\rm K}';
return ;
633 else if ( p%RPHkineticitymodel == 2 )
then
634 num_param = num_param + 1
635 if ( num_param == param_number ) then; param_name =
'RPHkineticity0' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_0^{\rm K}';
return ;
637 num_param = num_param + 1
638 if ( num_param == param_number ) then; param_name =
'RPHkineticityexp' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_{\rm exp}^{\rm K}';
return ;
641 if ( p%RPHbraidingmodel == 1 )
then
642 num_param = num_param + 1
643 if ( num_param == param_number ) then; param_name =
'RPHbraiding0' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_0^{\rm B}';
return ;
645 else if ( p%RPHbraidingmodel == 2 )
then
646 num_param = num_param + 1
647 if ( num_param == param_number ) then; param_name =
'RPHbraiding0' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_0^{\rm B}';
return ;
649 num_param = num_param + 1
650 if ( num_param == param_number ) then; param_name =
'RPHbraidingexp' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_{\rm exp}^{\rm B}';
return ;
653 if ( p%RPHtensormodel == 1 )
then
654 num_param = num_param + 1
655 if ( num_param == param_number ) then; param_name =
'RPHtensor0' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_0^{\rm T}';
return ;
657 else if ( p%RPHtensormodel == 2 )
then
658 num_param = num_param + 1
659 if ( num_param == param_number ) then; param_name =
'RPHtensor0' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_0^{\rm T}';
return ;
661 num_param = num_param + 1
662 if ( num_param == param_number ) then; param_name =
'RPHtensorexp' ;
if (
present(param_name_latex) ) param_name_latex =
'\alpha_{\rm exp}^{\rm T}';
return ;
666 else if ( p%EFTflag == 4 )
then
667 if ( p%FullMappingEFTmodel == 1 )
then
668 if ( p%HoravaSolarSystem .eqv. .true. )
then
669 num_param = num_param + 1
670 if ( num_param == param_number ) then; param_name =
'Horava_lambda' ;
if (
present(param_name_latex) ) param_name_latex =
'{\rm Horava}_{\lambda}';
return ;
672 num_param = num_param + 1
673 if ( num_param == param_number ) then; param_name =
'Horava_eta' ;
if (
present(param_name_latex) ) param_name_latex =
'{\rm Horava}_{\eta}';
return ;
676 num_param = num_param + 1
677 if ( num_param == param_number ) then; param_name =
'Horava_lambda' ;
if (
present(param_name_latex) ) param_name_latex =
'{\rm Horava}_{\lambda}';
return ;
679 num_param = num_param + 1
680 if ( num_param == param_number ) then; param_name =
'Horava_eta' ;
if (
present(param_name_latex) ) param_name_latex =
'{\rm Horava}_{\eta}';
return ;
682 num_param = num_param + 1
683 if ( num_param == param_number ) then; param_name =
'Horava_xi' ;
if (
present(param_name_latex) ) param_name_latex =
'{\rm Horava}_{\xi}';
return ;
690 #ifdef COSMICFISH_MGCAMB
691 if ( p%MGC_model == 1 )
then
692 num_param = num_param + 1
693 if ( num_param == param_number ) then; param_name =
'B1' ;
if (
present(param_name_latex) ) param_name_latex =
'B_{1}';
return ;
695 num_param = num_param + 1
696 if ( num_param == param_number ) then; param_name =
'B2' ;
if (
present(param_name_latex) ) param_name_latex =
'B_{2}';
return ;
698 num_param = num_param + 1
699 if ( num_param == param_number ) then; param_name =
'lambda1_2' ;
if (
present(param_name_latex) ) param_name_latex =
'\lambda_{1}^{2}';
return ;
701 num_param = num_param + 1
702 if ( num_param == param_number ) then; param_name =
'lambda2_2' ;
if (
present(param_name_latex) ) param_name_latex =
'\lambda_{2}^{2}';
return ;
704 num_param = num_param + 1
705 if ( num_param == param_number ) then; param_name =
'ss' ;
if (
present(param_name_latex) ) param_name_latex =
's';
return ;
707 else if ( p%MGC_model == 2 )
then
708 num_param = num_param + 1
709 if ( num_param == param_number ) then; param_name =
'MGQfix' ;
if (
present(param_name_latex) ) param_name_latex =
'Q_{0}';
return ;
711 num_param = num_param + 1
712 if ( num_param == param_number ) then; param_name =
'MGRfix' ;
if (
present(param_name_latex) ) param_name_latex =
'R_{0}';
return ;
714 else if ( p%MGC_model == 3 )
then
715 num_param = num_param + 1
716 if ( num_param == param_number ) then; param_name =
'Qnot' ;
if (
present(param_name_latex) ) param_name_latex =
'Q_{0}';
return ;
718 num_param = num_param + 1
719 if ( num_param == param_number ) then; param_name =
'Rnot' ;
if (
present(param_name_latex) ) param_name_latex =
'R_{0}';
return ;
721 num_param = num_param + 1
722 if ( num_param == param_number ) then; param_name =
'sss' ;
if (
present(param_name_latex) ) param_name_latex =
's';
return ;
724 else if ( p%MGC_model == 4 )
then
725 num_param = num_param + 1
726 if ( num_param == param_number ) then; param_name =
'B0' ;
if (
present(param_name_latex) ) param_name_latex =
'B_{0}';
return ;
728 else if ( p%MGC_model ==5 )
then
729 num_param = num_param + 1
730 if ( num_param == param_number ) then; param_name =
'B0' ;
if (
present(param_name_latex) ) param_name_latex =
'B_{0}';
return ;
732 num_param = num_param + 1
733 if ( num_param == param_number ) then; param_name =
'beta1' ;
if (
present(param_name_latex) ) param_name_latex =
'\beta_{1}';
return ;
735 num_param = num_param + 1
736 if ( num_param == param_number ) then; param_name =
's' ;
if (
present(param_name_latex) ) param_name_latex =
's';
return ;
738 else if ( p%MGC_model ==6 )
then
739 num_param = num_param + 1
740 if ( num_param == param_number ) then; param_name =
'Linder_gamma' ;
if (
present(param_name_latex) ) param_name_latex =
'\gamma_{\rm L}';
return ;
742 else if ( p%MGC_model == 7 )
then
743 num_param = num_param + 1
744 if ( num_param == param_number ) then; param_name =
'beta_star' ;
if (
present(param_name_latex) ) param_name_latex =
'\beta_{\star}';
return ;
746 num_param = num_param + 1
747 if ( num_param == param_number ) then; param_name =
'xi_star' ;
if (
present(param_name_latex) ) param_name_latex =
'\xi_{\star}';
return ;
749 num_param = num_param + 1
750 if ( num_param == param_number ) then; param_name =
'a_star' ;
if (
present(param_name_latex) ) param_name_latex =
'a_{\star}';
return ;
752 else if ( p%MGC_model == 8 )
then
753 num_param = num_param + 1
754 if ( num_param == param_number ) then; param_name =
'beta0' ;
if (
present(param_name_latex) ) param_name_latex =
'\beta_{0}';
return ;
756 num_param = num_param + 1
757 if ( num_param == param_number ) then; param_name =
'xi0' ;
if (
present(param_name_latex) ) param_name_latex =
'\xi_{0}';
return ;
759 num_param = num_param + 1
760 if ( num_param == param_number ) then; param_name =
'DilR' ;
if (
present(param_name_latex) ) param_name_latex =
'R_{\rm dil}';
return ;
762 num_param = num_param + 1
763 if ( num_param == param_number ) then; param_name =
'DilS' ;
if (
present(param_name_latex) ) param_name_latex =
'S_{\rm dil}';
return ;
765 else if ( p%MGC_model == 9 )
then
766 num_param = num_param + 1
767 if ( num_param == param_number ) then; param_name =
'F_R0' ;
if (
present(param_name_latex) ) param_name_latex =
'f_{R,0}';
return ;
769 num_param = num_param + 1
770 if ( num_param == param_number ) then; param_name =
'FRn' ;
if (
present(param_name_latex) ) param_name_latex =
'n';
return ;
772 else if ( p%MGC_model ==10 )
then
773 num_param = num_param + 1
774 if ( num_param == param_number ) then; param_name =
'beta0' ;
if (
present(param_name_latex) ) param_name_latex =
'\beta_0';
return ;
776 num_param = num_param + 1
777 if ( num_param == param_number ) then; param_name =
'A2' ;
if (
present(param_name_latex) ) param_name_latex =
'A_2';
return ;
790 Type(cambparams) ,
intent(in) :: P
792 integer ,
intent(in) :: num_param
793 real(dl),
dimension(num_param) ,
intent(out) :: params_array
795 integer :: ind, ind2, i, j, k
801 if ( fp%fisher_par%want_ombh2 )
then
802 params_array(ind) = p%omegab*(p%h0/100._dl)**2
806 if ( fp%fisher_par%want_omch2 )
then
807 params_array(ind) = p%omegac*(p%h0/100._dl)**2
811 if ( fp%fisher_par%want_omnuh2 )
then
812 params_array(ind) = p%omegan*(p%h0/100._dl)**2
816 if ( fp%fisher_par%want_hubble )
then
817 params_array(ind) = p%h0/100._dl
821 if ( fp%fisher_par%want_helium_fraction )
then
822 params_array(ind) = p%yhe
826 if ( fp%fisher_par%want_massless )
then
827 params_array(ind) = p%Num_Nu_massless
832 if ( fp%fisher_par%want_scalar_amp )
then
833 params_array(ind) = log(10._dl**10) + log(p%InitPower%ScalarPowerAmp(1))
837 if ( fp%fisher_par%want_scalar_spectral_index )
then
838 params_array(ind) = p%InitPower%an(1)
842 if ( fp%fisher_par%want_scalar_nrun )
then
843 params_array(ind) = p%InitPower%n_run(1)
847 if ( fp%fisher_par%want_tensor_spectral_index )
then
848 params_array(ind) = p%InitPower%ant(1)
852 if ( fp%fisher_par%want_initial_ratio )
then
853 params_array(ind) = p%InitPower%rat(1)
857 if ( fp%fisher_par%want_re_optical_depth )
then
858 params_array(ind) = p%Reion%optical_depth
864 if ( fp%fisher_par%want_bias )
then
866 do i = 1, num_redshiftwindows
867 if ( redshift_w(i)%kind == window_counts )
then
869 params_array(ind) = fp%fisher_cls%bias(ind2)
877 if ( fp%fisher_par%want_alpha_SN )
then
878 params_array(ind) = fp%fisher_SN%alpha_SN
882 if ( fp%fisher_par%want_beta_SN )
then
883 params_array(ind) = fp%fisher_SN%beta_SN
887 if ( fp%fisher_par%want_M0_SN )
then
888 params_array(ind) = fp%fisher_SN%M0_SN
892 #ifdef COSMICFISH_CAMB
895 if ( fp%fisher_par%want_w0_ppf )
then
896 params_array(ind) = p%w_lam
900 if ( fp%fisher_par%want_wa_ppf )
then
901 params_array(ind) = p%wa_ppf
905 if ( fp%fisher_par%want_cs_ppf )
then
906 params_array(ind) = p%cs2_lam
911 #ifdef COSMICFISH_EFTCAMB
914 if ( p%EFTflag /= 0 .and. p%EFTwDE /= 0 )
then
915 if ( p%EFTwDE == 1 )
then
916 params_array(ind) = p%EFTw0
918 else if ( p%EFTwDE == 2 )
then
919 params_array(ind) = p%EFTw0
920 params_array(ind+1) = p%EFTwa
922 else if ( p%EFTwDE == 3 )
then
923 params_array(ind) = p%EFTw0
924 params_array(ind+1) = p%EFTwa
925 params_array(ind+2) = p%EFTwn
927 else if ( p%EFTwDE == 4 )
then
928 params_array(ind) = p%EFTw0
929 params_array(ind+1) = p%EFTwa
930 params_array(ind+2) = p%EFTwat
932 else if ( p%EFTwDE == 5 )
then
933 params_array(ind) = p%EFTw0
934 params_array(ind+1) = p%EFTwa
935 params_array(ind+2) = p%EFTw2
936 params_array(ind+3) = p%EFTw3
938 else if ( p%EFTwDE == 6 )
then
939 stop
'You have to define the parametrization first'
944 if ( p%EFTflag == 1 )
then
946 if ( p%PureEFTmodelOmega == 1 )
then
947 params_array(ind) = p%EFTOmega0
949 else if ( p%PureEFTmodelOmega == 2 )
then
950 params_array(ind) = p%EFTOmega0
952 else if ( p%PureEFTmodelOmega == 3 )
then
953 params_array(ind) = p%EFTOmega0
954 params_array(ind+1) = p%EFTOmegaExp
956 else if ( p%PureEFTmodelOmega == 4 )
then
957 params_array(ind) = p%EFTOmega0
958 params_array(ind+1) = p%EFTOmegaExp
960 else if ( p%PureEFTmodelOmega == 5 )
then
961 stop
'You have to define the parametrization first'
964 if ( p%PureEFTmodelGamma1 == 1 )
then
965 params_array(ind) = p%EFTGamma10
967 else if ( p%PureEFTmodelGamma1 == 2 )
then
968 params_array(ind) = p%EFTGamma10
970 else if ( p%PureEFTmodelGamma1 == 3 )
then
971 params_array(ind) = p%EFTGamma10
972 params_array(ind+1) = p%EFTGamma1Exp
974 else if ( p%PureEFTmodelGamma1 == 4 )
then
975 params_array(ind) = p%EFTGamma10
976 params_array(ind+1) = p%EFTGamma1Exp
978 else if ( p%PureEFTmodelGamma1 == 5 )
then
979 stop
'You have to define the parametrization first'
982 if ( p%PureEFTmodelGamma2 == 1 )
then
983 params_array(ind) = p%EFTGamma20
985 else if ( p%PureEFTmodelGamma2 == 2 )
then
986 params_array(ind) = p%EFTGamma20
988 else if ( p%PureEFTmodelGamma2 == 3 )
then
989 params_array(ind) = p%EFTGamma20
990 params_array(ind+1) = p%EFTGamma2Exp
992 else if ( p%PureEFTmodelGamma2 == 4 )
then
993 params_array(ind) = p%EFTGamma20
994 params_array(ind+1) = p%EFTGamma2Exp
996 else if ( p%PureEFTmodelGamma2 == 5 )
then
997 stop
'You have to define the parametrization first'
1000 if ( p%PureEFTmodelGamma3 == 1 )
then
1001 params_array(ind) = p%EFTGamma30
1003 else if ( p%PureEFTmodelGamma3 == 2 )
then
1004 params_array(ind) = p%EFTGamma30
1006 else if ( p%PureEFTmodelGamma3 == 3 )
then
1007 params_array(ind) = p%EFTGamma30
1008 params_array(ind+1) = p%EFTGamma3Exp
1010 else if ( p%PureEFTmodelGamma3 == 4 )
then
1011 params_array(ind) = p%EFTGamma30
1012 params_array(ind+1) = p%EFTGamma3Exp
1014 else if ( p%PureEFTmodelGamma3 == 5 )
then
1015 stop
'You have to define the parametrization first'
1018 if ( p%PureEFTmodelGamma4 == 1 )
then
1019 params_array(ind) = p%EFTGamma40
1021 else if ( p%PureEFTmodelGamma4 == 2 )
then
1022 params_array(ind) = p%EFTGamma40
1024 else if ( p%PureEFTmodelGamma4 == 3 )
then
1025 params_array(ind) = p%EFTGamma40
1026 params_array(ind+1) = p%EFTGamma4Exp
1028 else if ( p%PureEFTmodelGamma4 == 4 )
then
1029 params_array(ind) = p%EFTGamma40
1030 params_array(ind+1) = p%EFTGamma4Exp
1032 else if ( p%PureEFTmodelGamma4 == 5 )
then
1033 stop
'You have to define the parametrization first'
1036 if ( p%PureEFTmodelGamma5 == 1 )
then
1037 params_array(ind) = p%EFTGamma50
1039 else if ( p%PureEFTmodelGamma5 == 2 )
then
1040 params_array(ind) = p%EFTGamma50
1042 else if ( p%PureEFTmodelGamma5 == 3 )
then
1043 params_array(ind) = p%EFTGamma50
1044 params_array(ind+1) = p%EFTGamma5Exp
1046 else if ( p%PureEFTmodelGamma5 == 4 )
then
1047 params_array(ind) = p%EFTGamma50
1048 params_array(ind+1) = p%EFTGamma5Exp
1050 else if ( p%PureEFTmodelGamma5 == 5 )
then
1051 stop
'You have to define the parametrization first'
1054 if ( p%PureEFTmodelGamma6 == 1 )
then
1055 params_array(ind) = p%EFTGamma60
1057 else if ( p%PureEFTmodelGamma6 == 2 )
then
1058 params_array(ind) = p%EFTGamma60
1060 else if ( p%PureEFTmodelGamma6 == 3 )
then
1061 params_array(ind) = p%EFTGamma60
1062 params_array(ind+1) = p%EFTGamma6Exp
1064 else if ( p%PureEFTmodelGamma6 == 4 )
then
1065 params_array(ind) = p%EFTGamma60
1066 params_array(ind+1) = p%EFTGamma6Exp
1068 else if ( p%PureEFTmodelGamma6 == 5 )
then
1069 stop
'You have to define the parametrization first'
1071 else if ( p%EFTflag == 2 )
then
1072 if ( p%DesignerEFTmodel == 1 )
then
1073 params_array(ind) = p%EFTB0
1075 else if ( p%DesignerEFTmodel == 2 )
then
1077 else if ( p%EFTflag == 3 )
then
1078 if ( p%AltParEFTmodel == 1 )
then
1079 if ( p%RPHmassPmodel == 1 )
then
1080 params_array(ind) = p%RPHmassP0
1082 else if ( p%RPHmassPmodel == 2 )
then
1083 params_array(ind) = p%RPHmassP0
1084 params_array(ind+1) = p%RPHmassPexp
1087 if ( p%RPHkineticitymodel == 1 )
then
1088 params_array(ind) = p%RPHkineticity0
1090 else if ( p%RPHkineticitymodel == 2 )
then
1091 params_array(ind) = p%RPHkineticity0
1092 params_array(ind+1) = p%RPHkineticityexp
1095 if ( p%RPHbraidingmodel == 1 )
then
1096 params_array(ind) = p%RPHbraiding0
1098 else if ( p%RPHbraidingmodel == 2 )
then
1099 params_array(ind) = p%RPHbraiding0
1100 params_array(ind+1) = p%RPHbraidingexp
1103 if ( p%RPHtensormodel == 1 )
then
1104 params_array(ind) = p%RPHtensor0
1106 else if ( p%RPHtensormodel == 2 )
then
1107 params_array(ind) = p%RPHtensor0
1108 params_array(ind+1) = p%RPHtensorexp
1112 else if ( p%EFTflag == 4 )
then
1113 if ( p%FullMappingEFTmodel == 1 )
then
1114 if ( p%HoravaSolarSystem .eqv. .true. )
then
1115 params_array(ind) = p%Horava_lambda
1116 params_array(ind+1) = p%Horava_eta
1119 params_array(ind) = p%Horava_lambda
1120 params_array(ind+1) = p%Horava_eta
1121 params_array(ind+2) = p%Horava_xi
1128 #ifdef COSMICFISH_MGCAMB
1129 if ( p%MGC_model == 1 )
then
1130 params_array(ind) = p%B1
1131 params_array(ind+1) = p%B2
1132 params_array(ind+2) = p%lambda1_2
1133 params_array(ind+3) = p%lambda2_2
1134 params_array(ind+4) = p%ss
1136 else if ( p%MGC_model == 2 )
then
1137 params_array(ind) = p%MGQfix
1138 params_array(ind+1) = p%MGRfix
1140 else if ( p%MGC_model == 3 )
then
1141 params_array(ind) = p%Qnot
1142 params_array(ind+1) = p%Rnot
1143 params_array(ind+2) = p%sss
1145 else if ( p%MGC_model == 4 )
then
1146 params_array(ind) = p%B0
1148 else if ( p%MGC_model ==5 )
then
1149 params_array(ind) = p%B0
1150 params_array(ind+1) = p%B1
1151 params_array(ind+2) = p%ss
1153 else if ( p%MGC_model ==6 )
then
1154 params_array(ind) = p%Linder_gamma
1156 else if ( p%MGC_model == 7 )
then
1157 params_array(ind) = p%beta_star
1158 params_array(ind+1) = p%xi_star
1159 params_array(ind+2) = p%a_star
1161 else if ( p%MGC_model == 8 )
then
1162 params_array(ind) = p%beta0
1163 params_array(ind+1) = p%xi0
1164 params_array(ind+2) = p%DilR
1165 params_array(ind+3) = p%DilS
1167 else if ( p%MGC_model == 9 )
then
1168 params_array(ind) = p%F_R0
1169 params_array(ind+1) = p%FRn
1171 else if ( p%MGC_model ==10 )
then
1172 params_array(ind) = p%beta0
1173 params_array(ind+1) = p%A_2
1179 if ( ind-1 /= num_param ) stop
'CAMB_params_to_params_array: Wrong assignment of parameters'
1190 Type(cambparams) :: P
1192 integer ,
intent(in) :: num_param
1193 real(dl),
dimension(num_param) ,
intent(in) :: params_array
1195 integer :: ind, ind2, i, j, k
1201 if ( fp%fisher_par%want_hubble )
then
1202 if ( fp%fisher_par%want_ombh2 ) i = i + 1
1203 if ( fp%fisher_par%want_omch2 ) i = i + 1
1204 if ( fp%fisher_par%want_omnuh2 ) i = i + 1
1205 p%h0 = params_array(i)*100._dl
1208 if ( fp%fisher_par%want_ombh2 )
then
1209 p%omegab = params_array(ind)/(p%h0/100._dl)**2
1213 if ( fp%fisher_par%want_omch2 )
then
1214 p%omegac = params_array(ind)/(p%h0/100._dl)**2
1218 if ( fp%fisher_par%want_omnuh2 )
then
1219 p%omegan = params_array(ind)/(p%h0/100._dl)**2
1223 if ( fp%fisher_par%want_hubble )
then
1227 p%omegav = 1- p%omegab- p%omegac - p%omegan
1230 if ( fp%fisher_par%want_helium_fraction )
then
1231 p%yhe = params_array(ind)
1235 if ( fp%fisher_par%want_massless )
then
1236 p%Num_Nu_massless = params_array(ind)
1241 if ( fp%fisher_par%want_scalar_amp )
then
1242 p%InitPower%ScalarPowerAmp(1) = exp(params_array(ind))/(10._dl**10)
1246 if ( fp%fisher_par%want_scalar_spectral_index )
then
1247 p%InitPower%an(1) = params_array(ind)
1251 if ( fp%fisher_par%want_scalar_nrun )
then
1252 p%InitPower%n_run(1) = params_array(ind)
1256 if ( fp%fisher_par%want_tensor_spectral_index )
then
1257 p%InitPower%ant(1) = params_array(ind)
1261 if ( fp%fisher_par%want_initial_ratio )
then
1262 p%InitPower%rat(1) = params_array(ind)
1266 if ( fp%fisher_par%want_re_optical_depth )
then
1267 p%Reion%optical_depth = params_array(ind)
1273 if ( fp%fisher_par%want_bias )
then
1275 do i = 1, num_redshiftwindows
1276 if ( redshift_w(i)%kind == window_counts )
then
1278 fp%fisher_cls%bias(ind2) = params_array(ind)
1279 redshift_w(i)%bias = fp%fisher_cls%bias(ind2)
1287 if ( fp%fisher_par%want_alpha_SN )
then
1288 fp%fisher_SN%alpha_SN = params_array(ind)
1292 if ( fp%fisher_par%want_beta_SN )
then
1293 fp%fisher_SN%beta_SN = params_array(ind)
1297 if ( fp%fisher_par%want_M0_SN )
then
1298 fp%fisher_SN%M0_SN = params_array(ind)
1302 #ifdef COSMICFISH_CAMB
1305 if ( fp%fisher_par%want_w0_ppf )
then
1306 p%w_lam = params_array(ind)
1310 if ( fp%fisher_par%want_wa_ppf )
then
1311 p%wa_ppf = params_array(ind)
1315 if ( fp%fisher_par%want_cs_ppf )
then
1316 p%cs2_lam = params_array(ind)
1317 call setcgammappf( p )
1322 #ifdef COSMICFISH_EFTCAMB
1325 if ( p%EFTflag /= 0 .and. p%EFTwDE /= 0 )
then
1326 if ( p%EFTwDE == 1 )
then
1327 p%EFTw0 = params_array(ind)
1329 else if ( p%EFTwDE == 2 )
then
1330 p%EFTw0 = params_array(ind)
1331 p%EFTwa = params_array(ind+1)
1333 else if ( p%EFTwDE == 3 )
then
1334 p%EFTw0 = params_array(ind)
1335 p%EFTwa = params_array(ind+1)
1336 p%EFTwn = params_array(ind+2)
1338 else if ( p%EFTwDE == 4 )
then
1339 p%EFTw0 = params_array(ind)
1340 p%EFTwa = params_array(ind+1)
1341 p%EFTwat = params_array(ind+2)
1343 else if ( p%EFTwDE == 5 )
then
1344 p%EFTw0 = params_array(ind)
1345 p%EFTwa = params_array(ind+1)
1346 p%EFTw2 = params_array(ind+2)
1347 p%EFTw3 = params_array(ind+3)
1349 else if ( p%EFTwDE == 6 )
then
1350 stop
'You have to define the parametrization first'
1355 if ( p%EFTflag == 1 )
then
1357 if ( p%PureEFTmodelOmega == 1 )
then
1358 p%EFTOmega0 = params_array(ind)
1360 else if ( p%PureEFTmodelOmega == 2 )
then
1361 p%EFTOmega0 = params_array(ind)
1363 else if ( p%PureEFTmodelOmega == 3 )
then
1364 p%EFTOmega0 = params_array(ind)
1365 p%EFTOmegaExp = params_array(ind+1)
1367 else if ( p%PureEFTmodelOmega == 4 )
then
1368 p%EFTOmega0 = params_array(ind)
1369 p%EFTOmegaExp = params_array(ind+1)
1371 else if ( p%PureEFTmodelOmega == 5 )
then
1372 stop
'You have to define the parametrization first'
1375 if ( p%PureEFTmodelGamma1 == 1 )
then
1376 p%EFTGamma10 = params_array(ind)
1378 else if ( p%PureEFTmodelGamma1 == 2 )
then
1379 p%EFTGamma10 = params_array(ind)
1381 else if ( p%PureEFTmodelGamma1 == 3 )
then
1382 p%EFTGamma10 = params_array(ind)
1383 p%EFTGamma1Exp = params_array(ind+1)
1385 else if ( p%PureEFTmodelGamma1 == 4 )
then
1386 p%EFTGamma10 = params_array(ind)
1387 p%EFTGamma1Exp = params_array(ind+1)
1389 else if ( p%PureEFTmodelGamma1 == 5 )
then
1390 stop
'You have to define the parametrization first'
1393 if ( p%PureEFTmodelGamma2 == 1 )
then
1394 p%EFTGamma20 = params_array(ind)
1396 else if ( p%PureEFTmodelGamma2 == 2 )
then
1397 p%EFTGamma20 = params_array(ind)
1399 else if ( p%PureEFTmodelGamma2 == 3 )
then
1400 p%EFTGamma20 = params_array(ind)
1401 p%EFTGamma2Exp = params_array(ind+1)
1403 else if ( p%PureEFTmodelGamma2 == 4 )
then
1404 p%EFTGamma20 = params_array(ind)
1405 p%EFTGamma2Exp = params_array(ind+1)
1407 else if ( p%PureEFTmodelGamma2 == 5 )
then
1408 stop
'You have to define the parametrization first'
1411 if ( p%PureEFTmodelGamma3 == 1 )
then
1412 p%EFTGamma30 = params_array(ind)
1414 else if ( p%PureEFTmodelGamma3 == 2 )
then
1415 p%EFTGamma30 = params_array(ind)
1417 else if ( p%PureEFTmodelGamma3 == 3 )
then
1418 p%EFTGamma30 = params_array(ind)
1419 p%EFTGamma3Exp = params_array(ind+1)
1421 else if ( p%PureEFTmodelGamma3 == 4 )
then
1422 p%EFTGamma30 = params_array(ind)
1423 p%EFTGamma3Exp = params_array(ind+1)
1425 else if ( p%PureEFTmodelGamma3 == 5 )
then
1426 stop
'You have to define the parametrization first'
1429 if ( p%PureEFTmodelGamma4 == 1 )
then
1430 p%EFTGamma40 = params_array(ind)
1432 else if ( p%PureEFTmodelGamma4 == 2 )
then
1433 p%EFTGamma40 = params_array(ind)
1435 else if ( p%PureEFTmodelGamma4 == 3 )
then
1436 p%EFTGamma40 = params_array(ind)
1437 p%EFTGamma4Exp = params_array(ind+1)
1439 else if ( p%PureEFTmodelGamma4 == 4 )
then
1440 p%EFTGamma40 = params_array(ind)
1441 p%EFTGamma4Exp = params_array(ind+1)
1443 else if ( p%PureEFTmodelGamma4 == 5 )
then
1444 stop
'You have to define the parametrization first'
1447 if ( p%PureEFTmodelGamma5 == 1 )
then
1448 p%EFTGamma50 = params_array(ind)
1450 else if ( p%PureEFTmodelGamma5 == 2 )
then
1451 p%EFTGamma50 = params_array(ind)
1453 else if ( p%PureEFTmodelGamma5 == 3 )
then
1454 p%EFTGamma50 = params_array(ind)
1455 p%EFTGamma5Exp = params_array(ind+1)
1457 else if ( p%PureEFTmodelGamma5 == 4 )
then
1458 p%EFTGamma50 = params_array(ind)
1459 p%EFTGamma5Exp = params_array(ind+1)
1461 else if ( p%PureEFTmodelGamma5 == 5 )
then
1462 stop
'You have to define the parametrization first'
1465 if ( p%PureEFTmodelGamma6 == 1 )
then
1466 p%EFTGamma60 = params_array(ind)
1468 else if ( p%PureEFTmodelGamma6 == 2 )
then
1469 p%EFTGamma60 = params_array(ind)
1471 else if ( p%PureEFTmodelGamma6 == 3 )
then
1472 p%EFTGamma60 = params_array(ind)
1473 p%EFTGamma6Exp = params_array(ind+1)
1475 else if ( p%PureEFTmodelGamma6 == 4 )
then
1476 p%EFTGamma60 = params_array(ind)
1477 p%EFTGamma6Exp = params_array(ind+1)
1479 else if ( p%PureEFTmodelGamma6 == 5 )
then
1480 stop
'You have to define the parametrization first'
1482 else if ( p%EFTflag == 2 )
then
1483 if ( p%DesignerEFTmodel == 1 )
then
1484 p%EFTB0 = params_array(ind)
1486 else if ( p%DesignerEFTmodel == 2 )
then
1488 else if ( p%EFTflag == 3 )
then
1489 if ( p%AltParEFTmodel == 1 )
then
1490 if ( p%RPHmassPmodel == 1 )
then
1491 p%RPHmassP0 = params_array(ind)
1493 else if ( p%RPHmassPmodel == 2 )
then
1494 p%RPHmassP0 = params_array(ind)
1495 p%RPHmassPexp = params_array(ind+1)
1498 if ( p%RPHkineticitymodel == 1 )
then
1499 p%RPHkineticity0 = params_array(ind)
1501 else if ( p%RPHkineticitymodel == 2 )
then
1502 p%RPHkineticity0 = params_array(ind)
1503 p%RPHkineticityexp = params_array(ind+1)
1506 if ( p%RPHbraidingmodel == 1 )
then
1507 p%RPHbraiding0 = params_array(ind)
1509 else if ( p%RPHbraidingmodel == 2 )
then
1510 p%RPHbraiding0 = params_array(ind)
1511 p%RPHbraidingexp = params_array(ind+1)
1514 if ( p%RPHtensormodel == 1 )
then
1515 p%RPHtensor0 = params_array(ind)
1517 else if ( p%RPHtensormodel == 2 )
then
1518 p%RPHtensor0 = params_array(ind)
1519 p%RPHtensorexp = params_array(ind+1)
1523 else if ( p%EFTflag == 4 )
then
1524 if ( p%FullMappingEFTmodel == 1 )
then
1525 if ( p%HoravaSolarSystem .eqv. .true. )
then
1526 p%Horava_lambda = params_array(ind)
1527 p%Horava_eta = params_array(ind+1)
1530 p%Horava_lambda = params_array(ind)
1531 p%Horava_eta = params_array(ind+1)
1532 p%Horava_xi = params_array(ind+2)
1539 #ifdef COSMICFISH_MGCAMB
1540 if ( p%MGC_model == 1 )
then
1541 p%B1 = params_array(ind)
1542 p%B2 = params_array(ind+1)
1543 p%lambda1_2 = params_array(ind+2)
1544 p%lambda2_2 = params_array(ind+3)
1545 p%ss = params_array(ind+4)
1547 else if ( p%MGC_model == 2 )
then
1548 p%MGQfix = params_array(ind)
1549 p%MGRfix = params_array(ind+1)
1551 else if ( p%MGC_model == 3 )
then
1552 p%Qnot = params_array(ind)
1553 p%Rnot = params_array(ind+1)
1554 p%sss = params_array(ind+2)
1556 else if ( p%MGC_model == 4 )
then
1557 p%B0 = params_array(ind)
1559 p%lambda1_2 = (p%B0*(299792458.d-3)**2)/(2.d0*p%H0**2)
1561 p%lambda2_2 = p%B1*p%lambda1_2
1564 else if ( p%MGC_model ==5 )
then
1565 p%B0 = params_array(ind)
1566 p%B1 = params_array(ind+1)
1567 p%lambda1_2 = (p%B0*(299792458.d-3)**2)/(2.d0*p%H0**2)
1568 p%B2 = 2.d0/p%B1 -1.d0
1569 p%lambda2_2 = p%B1*p%lambda1_2
1570 p%ss = params_array(ind+2)
1572 else if ( p%MGC_model ==6 )
then
1573 p%Linder_gamma = params_array(ind)
1575 else if ( p%MGC_model == 7 )
then
1576 p%beta_star = params_array(ind)
1577 p%xi_star = params_array(ind+1)
1578 p%a_star = params_array(ind+2)
1579 p%GRtrans = p%a_star
1581 else if ( p%MGC_model == 8 )
then
1582 p%beta0 = params_array(ind)
1583 p%xi0 = params_array(ind+1)
1584 p%DilR = params_array(ind+2)
1585 p%DilS = params_array(ind+3)
1587 else if ( p%MGC_model == 9 )
then
1588 p%F_R0 = params_array(ind)
1589 p%FRn = params_array(ind+1)
1590 p%beta0 = 1.d0/sqrt(6.d0)
1592 else if ( p%MGC_model ==10 )
then
1593 p%beta0 = params_array(ind)
1594 p%A_2 = params_array(ind+1)
1600 if ( ind-1 /= num_param ) stop
'Wrong assignment of parameters'
1601 if (.not. camb_validateparams(p)) stop
'Stopped due to parameter error'
1612 Type(cambparams) :: P
1614 integer ,
intent(in) :: fish_dim
1615 real(dl),
intent(in),
dimension(fish_dim, fish_dim) :: fisher_matrix
1616 character(len=*),
intent(in) :: filename
1619 character(LEN=500) :: param_name
1620 character(LEN=500) :: param_name_latex
1621 real(dl),
allocatable,
dimension(:) :: parameters
1623 allocate( parameters(fish_dim) )
1626 open(unit=666, file=filename, action=
"write", status=
"replace")
1629 write(666,
'(a)')
'#'
1630 write(666,
'(a)')
'# This file contains a Fisher matrix created with the CosmicFish code.'
1632 write(666,
'(a)')
'#'
1633 write(666,
'(a)')
'# The parameters of this Fisher matrix are:'
1634 write(666,
'(a)')
'#'
1636 do ind = 1, fish_dim
1638 write(666,
'(a,I5,a,a,a,a,a,E25.16)')
'#', ind,
' ', trim(param_name),
' ', trim(param_name_latex),
' ', parameters(ind)
1641 write(666,
'(a)')
'#'
1645 do ind = 1, fish_dim
1646 write(666,
'(2x,*(E25.16,2x))') fisher_matrix(ind, :)
1659 Type(cambparams) :: P
1661 integer ,
intent(in) :: fish_dim
1662 character(len=*),
intent(in) :: filename
1665 character(LEN=500) :: param_name
1666 character(LEN=500) :: param_name_latex
1667 real(dl),
allocatable,
dimension(:) :: parameters
1669 allocate( parameters(fish_dim) )
1672 open(unit=666, file=filename, action=
"write", status=
"replace")
1676 write(666,
'(a)')
'#'
1677 write(666,
'(a)')
'# This file contains the parameter names for a Fisher matrix.'
1678 write(666,
'(a)')
'#'
1681 do ind = 1, fish_dim
1683 write(666,
'(a,a,a,a,E25.16)') trim(param_name),
' ', trim(param_name_latex),
' ', parameters(ind)
subroutine, public params_array_to_camb_param(P, FP, num_param, params_array)
This subroutine updates the values of the parameters P and FP based on the values contained in the pa...
subroutine, public save_fisher_to_file(P, FP, fish_dim, fisher_matrix, filename)
This subroutine saves the Fisher matrix to file taking care of putting into the file all the relevant...
subroutine, public camb_params_to_params_array(P, FP, num_param, params_array)
This subroutine updates the values of the parameters array based on the values of P and FP...
This module contains the definitions of derived data types used to store the informations about the f...
subroutine, public fisher_param_names(P, FP, param_number, param_name, param_name_latex)
This subroutine returns the name corresponding to a parameter number.
This module contains the interface layer between CosmicFish and CAMB.
subroutine, public num_param_fisher(P, FP, num_param)
This subroutine returns the number of parameters in the Fisher matrix based on the input parameters...
subroutine, public save_paramnames_to_file(P, FP, fish_dim, filename)
This subroutine saves a file containing the parameter names for the Fisher matrix run...
This derived data type contains all the informations that the cosmicfish code needs to run...