Xrf fit

don't cast to float like this, if you want `index` to be an array of floats use `np.arange(n_background, dtype=float)` as above.