Xrf fit

This is the experience from the previous author, basically some empirical experience. If we change the binning size, the window will also change accordingly. We can leave it like this currently, I checked that it works fine.