Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Residual errors are 0 #92

@ZvejysMegejas

Description

@ZvejysMegejas

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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions