Xrf fit

I think that this entire block can be done as

```
lo_index = np.clip(index - window_p, np.max(xmin, 0), np.min(xmax, n_background - 1))
hi_index = np.clip(index + window_p, np.max(xmin, 0), np.min(xmax, n_background - 1))
```

and can go outside of the loop.