-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi,
I'm a new user of Rascal. Trying to use it to calibrate the spectrometer. After messing around with custom atlas lines and all other setting I managed to get satisfactory line matches. However I noticed that the Residual error and RMS were shown as zeros in c.plot_fit. I looked in the code of the plot.fit in plotting.py, and I have feeling that the error sits over there. As I'm a new Python user as well, I can not pinpoint where is that exactly as the code for the Residual Error calculations seems complicated for me. A simpler code gives "proper" numbers for Residual error.
peaks_angstr = c.polyval(matched_peaks, fit_coeff1)
diff = []
for i, j in zip(peaks_angstr, matched_atlas):
diff.append(i - j)
print(diff)
# RMS calculations
rms = np.sqrt(np.mean(np.array(diff) ** 2.0))
print(rms)