Hello, Dr. Matt Newville, I think I found what was wrong, and it seems to work in k-space. I didn't try R-space yet. Here is new file, where the calculation is correct. Of course it is test spectrum without noise that gave small values of chi_square, I tested normal spectrum and there it was a minor change (but noticeable, something in second number after point) One error is that in k space we should divide to 2*N_data. It is not what is in manual, but you say it is not good tested, I don't mind because it works. Second error is mine - I used nofx function because there was no rounding to the small number in IFEFFIT shell, and didn't think 1 point will give such a change, but it was eventually because of exact spectrum. There is something strange with array numeration, because written arrays begin with 0, and in program it seems shifted, but it also is a minor problem. The accuracy is in 4-5 number after point, I think it is single precision in IFEFFIT shell, but it is enough for calculations. With that I can proceed. So if you are busy, it is now not worthy wasting many time for my question (that's why I write), but I will be very glad if somewhere you will correct me if there is something wrong, and if you will tell me what I don't know about FT transforms with Bayesian analysis. And I'm very thankful for your invitation to think of Larch and Bayes together, and for your colleagues' suggestion of Bayes project work, I will surely try Larch when having a time for this, and if could, will continue these studies - for us it obviously depends on situation and financing, too, it should give results, that's why I tried a simple way. But it is very interesting and you were very helpful. Thanks a lot, Olga Kashurnikova