#check of 1 sphere MeO1 test - the same as program and by abs variables load fit_macros.iff load Me_O1.iff set_guess show @variables A=0e0 chi2_extra=sqrt(A*(N_MeO1_rel**2+R_MeO1_rel**2+Sig_MeO1_rel**2+E_MeO1_rel**2)) S02=0.921 set_paths feff0001.dat noise_FT=3.92e-3 read_spectrum_1_chi hfgd_n4_10k_O_k0_i3.mod, Me_chi ff2chi(1,group=before) show @paths write_data(file=datmodel.dat,Me_chi.k,Me_chi.chi,before.k,before.chi) fit_cycle_1_chi Me_chi, 1, 0e0 show @variables show @scalars write_data(file=datmodel.dat,Me_chi.k,Me_chi.chi,before.k,before.chi,fit.k,fit.chi) datmodel.func=(Me_chi.chi-fit.chi)**2 datmodel_sliced.func=slice(datmodel.func,nofx(Me_chi.k,kmin_Me_chi),nofx(Me_chi.k,kmax_Me_chi)) chi_square_calc=N_idp/N_pts_Me_chi*vsum(datmodel_sliced.func)/epsilon_k**2+chi2_extra**2 show chi_square_calc