Xrf fit

This whole section should be wrapped in a context manager and the exception should not be caught.  If the file fails to open, the code below will fail (if I am reading it correctly).


```
with open(my_file, 'r') as f_in:
    lines = f_in.read_all()

```

The context manager makes sure that the file is properly closed in all cases.