clc
clear
A=load('Example_data.txt');
t=A(:,1)';
DATA=A(:,2:end)';
Broadband=mean(DATA);


%PrepareData(NAME,DATA,t,Period,MidTransit,Inclination,LLD,QLD,ap,p)
PrepareData('Eample_1',DATA,t,0.8,0.7,80,0.2,0.3,3.5,0.15);
PrepareData('Eample_Broadband_1',Broadband,t,0.8,0.7,80,0.2,0.3,3.5,0.15);

RunExperiment('Eample_Broadband_1','N');


%PrepareMonteCarlos(NAME,N,RedNoise,WhiteNoise,UseJKTEBOP)
PrepareMonteCarlo('Eample_Broadband_1',100,0.5,0.5,true);


RunExperiment('Eample_Broadband_1_MC','H',10:10:80,1:63);
RunExperiment('Eample_Broadband_1_MC','HRR',10:10:80,1:63);

%[RBG,COF]=FindFilter(NAME,flag,RBG_range,COF_range)
[RBG_H,COF_H]=FindFilter('Eample_Broadband_1_MC','H',10:10:80,1:63);
[RBG_HRR,COF_HRR]=FindFilter('Eample_Broadband_1_MC','HRR',10:10:80,1:63);

RunExperiment('Eample_Broadband_1','H',RBG_H,COF_H);
RunExperiment('Eample_Broadband_1','HRR',RBG_HRR,COF_HRR);

RunExperiment('Eample_1','H',RBG_H,COF_H);
RunExperiment('Eample_1','HRR',RBG_HRR,COF_HRR);



RunExperiment('Eample_Broadband_1','N9');
RunExperiment('Eample_Broadband_1','H',RBG_H,COF_H);
RunExperiment('Eample_Broadband_1','HRR',RBG_HRR,COF_HRR);

RunExperiment('Eample_1','N9');
RunExperiment('Eample_1','H',RBG_H,COF_H);
RunExperiment('Eample_1','HRR',RBG_HRR,COF_HRR);





