#include "focalfields.h"

int main()
	{
	focus3d_parameters ini;
	ini.set_default();
	ini.theta_max = 58.0635*M_PI/180.0; // this angle because Carole's data goes from theta'=0 to theta'=58.0635
	ini.Ntheta = 21;
	
	focus3d_parameters scr;
	scr = ini;
	scr.theta_max = 87.0968*M_PI/180.0; // this angle beecause Carole's data goes from theta = 0 to theta=87.0968
	ini.Ntheta = 31;
	
	
	/*
	Array<complex<double>,2> G(scr.Ntheta,ini.Ntheta);
	G = 0;
	int diagonal = (scr.Ntheta < ini.Ntheta) ? scr.Ntheta : ini.Ntheta;
	for(int l =0; l < diagonal;l++)
		{
		G(l,l) = 1.0;
		}
	*/
	
	
	focus3dws fs(ini,scr);
	fs.set_scrambler_from_ascii("../focal_volume_with_scrambler_matrix/lam800_N1e9_050um/fplane_phase_re_21_columns.dat", "../focal_volume_with_scrambler_matrix/lam800_N1e9_050um/fplane_phase_im_21_columns.dat");
	fs.calculate_focus();
	fs.save_results("result_scr_31_rows_21_columns_matrix/result");

	focus3d fnos(ini);
	fnos.calculate_focus();
	fnos.save_results("result_noscr_31_rows_21_columns_matrix/result");
	return(0);
	}
