-
Notifications
You must be signed in to change notification settings - Fork 0
/
mcmc_bao.h
37 lines (17 loc) · 8.67 KB
/
mcmc_bao.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_cblas.h>
void do_Ptheo_multiple_iso(char *type_BAO_fit,char *type_of_analysis,char *fit_BAO,int modeP0,int modeP2,int modeP4, double k_theo[],double k_theo0[],double k_theo2[],double k_theo4[], double P_theo0[], double P_theo2[], double P_theo4[],int NeffP0,int NeffP2,int NeffP4, int factor_sampling_mask, double *parameters1,double *k_Plin,double *Plin,int Nlin, double *k_Olin, double *Olin, int NOlin,double *pos, double *W0, double *W2, double *W4, double *W6, double *W8, int Nmask, char *spacing_mask, char *path_to_mask1, double k0[], double k2[], double k4[], int Npolynomial, fftw_plan plan1, fftw_plan plan2, double kmin , double kmax, double kmin_data0 , double kmax_data0,double kmin_data2, double kmax_data2,double kmin_data4, double kmax_data4, int wiggle, char *spacing_data,char *spacing_theory, double Sigma_smooth);
void do_Ptheo_multiple_aniso(char *type_BAO_fit, char *type_of_analysis, char *fit_BAO,int modeP0,int modeP2,int modeP4, double k_theo[],double k_theo0[],double k_theo2[], double k_theo4[], double P_theo0[], double P_theo2[], double P_theo4[],int NeffP0,int NeffP2, int NeffP4,int factor_sampling_mask, double *parameters1,double *k_Plin,double *Plin,int Nlin, double *k_Olin, double *Olin, int NOlin, double Sigma_smooth,double *pos, double *W0, double *W2, double *W4, double *W6, double *W8, int Nmask, char *spacing_mask, char *path_to_mask1,double k0[], double k2[], double k4[], int Npoly, fftw_plan plan1, fftw_plan plan2, double kmin , double kmax, double kmin_data0 , double kmax_data0,double kmin_data2, double kmax_data2,double kmin_data4, double kmax_data4, int wiggle, char *spacing_data, char *spacing_theory);
//void mcmc_kernel(int nthreads, char *type_BAO_fit,char *type_of_analysis,int trial_mcmc,double **vector_buffer,double fraction, int N_Cov_prop, gsl_matrix *transform, gsl_matrix *transform_inverse, double *vector_mean, char *name_file_output_mcmc, char *fit_BAO,double *k_Plin,double *Plin,int N_Plin, double *k_Olin, double *Olin, int N_Olin, double *pos, double *W0, double *W2, double *W4,double *W6, double *W8,int Nmask, char *path_to_mask1, char *spacing_maskNGC, double *posSGC, double *W0SGC, double *W2SGC, double *W4SGC, double *W6SGC, double *W8SGC, int NmaskSGC, char *path_to_mask2, char *spacing_maskSGC, double *k0, double *P0, double *errP0, int NeffP0, double *k2, double *P2, double *errP2, int NeffP2, double *k4, double *P4, double *errP4, int NeffP4, double *k11, double *k22, double *k33, double *B0, double *errB0, double *Bnoise, int NeffB0, double *k0SGC, double *P0SGC, double *errP0SGC,int NeffP0SGC, double *k2SGC, double *P2SGC, double *errP2SGC,int NeffP2SGC, double *k4SGC, double *P4SGC, double *errP4SGC,int NeffP4SGC, double *k11SGC, double *k22SGC, double *k33SGC,double *B0SGC, double *BnoiseSGC,int NeffB0SGC, double *cov, double *covSGC, double alpha_min, double alpha_max, char *Sigma_def_type, char *Sigma_independent, double ffactor, double Sigma_type[], double Sigma_nl_mean[], double Sigma_nl_stddev[], int Npolynomial, int Nchunks, char *path_output, char *identifier, char *do_plot, long int Nsteps, char *do_power_spectrum, char *do_bispectrum,int Nalphas,int Nsigmas_tot, int Nsigmas_free, double **Theory, double Pnoise, double PnoiseSGC, char *ptmodel_ps, char *rsdmodel_ps, char *fogmodel_ps, char *ptmodel_bs, char *local_b2s2, char *local_b3nl, char *RSD_fit, char *sigma8_free, char *fog_free, char *fog_bs, double Sigma_smooth, int factor_sampling_mask,char *spacing_dataNGC,char *spacing_dataSGC,char *spacing_theory );
void mcmc_kernel(int nthreads, char *type_BAO_fit, char *type_of_analysis, int trial_mcmc, double **vector_buffer, double fraction, int N_Cov_prop, gsl_matrix *transform, gsl_matrix *transform_inverse, double *vector_mean, char *name_file_output_mcmc, char *fit_BAO, char *fit_RSD, double *k_Plin, double *Plin, int N_Plin, double *k_Olin, double *Olin, int N_Olin, double *pos, double *W0, double *W2, double *W4,double *W6, double *W8,int Nmask, char *path_to_mask1, char *spacing_maskNGC, double *posSGC, double *W0SGC, double *W2SGC, double *W4SGC, double *W6SGC, double *W8SGC, int NmaskSGC, char *path_to_mask2, char *spacing_maskSGC, double *k0bao, double *k0rsd, double *P0bao, double *P0rsd, double *errP0bao, double *errorP0rsd, int NeffP0bao, int NeffP0rsd, double *k2bao, double *k2rsd, double *P2bao, double *P2rsd, double *errP2bao, double *errP2rsd, int NeffP2bao, int NeffP2rsd, double *k4bao, double *k4rsd, double *P4bao, double *P4rsd, double *errP4bao, double *errP4rsd, int NeffP4bao, int NeffP4rsd, double *k11bao, double *k11rsd, double *k22bao, double *k22rsd, double *k33bao, double *k33rsd, double *B0bao, double *B0rsd, double *errB0bao, double *errB0rsd, double *Bnoise_bao, double *Bnoise_rsd, int NeffB0bao, int NeffB0rsd, double *k0baoSGC, double *k0rsdSGC, double *P0baoSGC, double *P0rsdSGC, double *errP0baoSGC, double *errP0rsdSGC,int NeffP0baoSGC,int NeffP0rsdSGC, double *k2baoSGC,double *k2rsdSGC, double *P2baoSGC,double *P2rsdSGC, double *errP2baoSGC,double *errP2rsdSGC,int NeffP2baoSGC,int NeffP2rsdSGC, double *k4baoSGC, double *k4rsdSGC, double *P4baoSGC,double *P4rsdSGC, double *errP4baoSGC,double *errP4rsdSGC,int NeffP4baoSGC,int NeffP4rsdSGC, double *k11baoSGC,double *k11rsdSGC, double *k22baoSGC,double *k22rsdSGC, double *k33baoSGC,double *k33rsdSGC,double *B0baoSGC,double *B0rsdSGC, double *Bnoise_baoSGC, double *Bnoise_rsdSGC,int NeffB0baoSGC,int NeffB0rsdSGC, double *cov, double *covSGC, double alpha_min, double alpha_max, char *Sigma_def_type, char *Sigma_independent, double ffactor, double Sigma_type[], double Sigma_nl_mean[], double Sigma_nl_stddev[], int Npolynomial, int Nchunks, char *path_output, char *identifier, char *do_plot, long int Nsteps, char *do_power_spectrum, char *do_bispectrum,int Nalphas,int Nsigmas_tot, int Nsigmas_free, double **Theory, int Ntheory, double Pnoise, double PnoiseSGC, char *ptmodel_ps, char *rsdmodel_ps, char *fogmodel_ps, char *ptmodel_bs, char *local_b2s2, char *local_b3nl, char *RSD_fit, char *sigma8_free, char *fog_free, char *fog_bs, double Sigma_smooth,int factor_sampling_mask,char *spacing_data_baoNGC,char *spacing_data_rsdNGC,char *spacing_data_baoSGC,char *spacing_rsdSGC,char *spacing_theory_bao,char *char_spacing_theory_rsd,char *type_of_analysis_BAO,char *type_of_analysis_FS );
int get_convergence(char *filename, int Nparams,long int lines);
int get_convergence_parallel(int nthreads, char *identifier, int Nparams);
void generate_rotation_matrix(int N_Cov_prop,double *Cov_prop, double *vector_mean, gsl_matrix transform_inverse[], gsl_matrix transform[],int trial_mcmc);
void read_prop_cov(double **vector_buffer,long int Nmax, int trial_mcmc, char *path_to_cov,double Cov_prop[],double vector_cov_prop[],int N_Cov_prop);
void write_prop_cov(char *path_to_chain, int N_Cov_prop);
void do_bao_mcmc(int nthreads, char *type_BAO_fit,char *type_of_analysis,char *fit_BAO,double *k_Plin,double *Plin,int N_Plin, double *k_Olin, double *Olin, int N_Olin, double *pos, double *W0, double *W2, double *W4,double *W6, double *W8,int Nmask, char *path_to_mask1, char *spacing_maskNGC, double *posSGC, double *W0SGC, double *W2SGC, double *W4SGC, double *W6SGC, double *W8SGC, int NmaskSGC, char *path_to_mask2, char *spacing_maskSGC, double *k0, double *P0, double *errP0, int NeffP0, double *k2, double *P2, double *errP2, int NeffP2, double *k4, double *P4, double *errP4, int NeffP4, double *k11, double *k22, double *k33, double *B0, double *errB0, double *Bnoise, int NeffB0, double *k0SGC, double *P0SGC, double *errP0SGC,int NeffP0SGC, double *k2SGC, double *P2SGC, double *errP2SGC,int NeffP2SGC, double *k4SGC, double *P4SGC, double *errP4SGC,int NeffP4SGC, double *k11SGC, double *k22SGC, double *k33SGC,double *B0SGC, double *errB0SGC, double *BnoiseSGC,int NeffB0SGC, double *cov, double *covSGC, double alpha_min, double alpha_max, char *Sigma_def_type, char *Sigma_independent, double ffactor, double Sigma_type[], double Sigma_nl_mean[], double Sigma_nl_stddev[], int Npolynomial, int Nchunks, char *path_output, char *identifier, char *do_plot, char *use_prop_cov, char *path_to_cov, long int Nsteps, char *do_power_spectrum, char *do_bispectrum, double Sigma_smooth,char *spacing_dataNGC,char *spacing_dataSGC, char *spacing_theory,char *type_of_analysis_BAO, char *type_of_analysis_FS);
void set_mcmc_parameters(long int params[]);
void do_log_file(int nthreads, char *name_file,int Nparams,long int lines,long int time_run,long int abs_counter,long int j_run,long int Nburnout,char *identifier, double mean_params[],double min_params[]);
void set_parameters_convergence(double parameters_convergence[]);
void set_parameters_convergence_parallel(int nthreads, double parameters_convergence[]);