Skip to content

Commit

Permalink
fxied residual plotting error in matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
cylammarco committed Jun 27, 2023
1 parent 57e5014 commit a21192a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/example_lt_sprat_xe_manual_atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
c.plot_arc()
c.set_hough_properties(
num_slopes=2000,
range_tolerance=500.0,
range_tolerance=250.0,
xbins=100,
ybins=100,
min_wavelength=3500.0,
min_wavelength=3800.0,
max_wavelength=8000.0,
)
c.set_ransac_properties(sample_size=5, top_n_candidate=5, filter_close=True)
Expand Down
Binary file modified examples/output/lt-sprat-arc-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/rascal/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,8 @@ def plot_fit(
all_diff = []

first_one = True
for p, x in zip(calibrator.matched_peaks, calibrator.matched_atlas):
for p in calibrator.peaks:
x = calibrator.polyval(p, fit_coeff)
diff = calibrator.atlas.get_lines() - x
idx = np.argmin(np.abs(diff))
all_diff.append(diff[idx])
Expand Down

0 comments on commit a21192a

Please sign in to comment.