Xrf fit

prefer `dx = np.array(dx)`