Hello, There are text files in attachment, save them to the same directory an load check.iff in Ifeffit shell I hope attachments will work well. There are two .iff files with macros I need and the retranslation of what program does. And feff and spectrum files, too. The spectrum is generated from the same feff, for 1 shell, but in VIPER for easy visualization, so it can be the other formula, but should be close (there were close parametra e1=5.1523,n1=7.0612,r1=2.1107,s1=7.4408e-3 - it is the fitted model for mu0 corrections initially). I haven't append the noise, think that foe chi_square formula check it is not important, but if it is, I can try. May be some other parametra wrong, I can't understand it now. Compare program chi_square and chi_square_calc that I calculated for the suggestion of formula. In this case the restraint=0, so the restraint part doesn't mean - it should be checked when we understand the normalization. Here, for 1 sphere I need not a regularizer, but the method can be tested on it and should also give Bayesian analysis good, because there are some correlations. (I tried it in the own program - it works, but there are other errors why I need to use IFEFFIT while haven't completed it) So, this formula doesn't work, what is wrong - how to take FT into account or renormalize? If I know how it renormalizes, I can renormalize the errors for my need. I understand that errors and correlations are of a covariance matrix calculated for chi_square(param)/chi_reduced(min), where the denominator is the end value in min and only a norm. I need a covariance of chi_square without N_idp/N_data multiplier Thankful, Olga Kashurnikova, MEPhI, Moscow