Skip to content

Commit

Permalink
Merge pull request #28 from sjfraser05/sf/rubberband
Browse files Browse the repository at this point in the history
Rubberband baseline correction edited
  • Loading branch information
charlesll authored Aug 18, 2021
2 parents ea13176 + 6b4cc05 commit d443cd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rampy/baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def baseline(x_input,y_input,bir,method, **kwargs):
# code from this stack-exchange forum
#https://dsp.stackexchange.com/questions/2725/how-to-perform-a-rubberband-correction-on-spectroscopic-data

x = x.flatten()
# Find the convex hull
v = ConvexHull([[X[0], X[1]] for X in zip(x, y)]).vertices

v = ConvexHull(np.array(list(zip(x, y))), incremental=True).vertices
#v = ConvexHull(np.vstack((x.ravel(), y.ravel())).T).vertices

# Rotate convex hull vertices until they start from the lowest one
Expand Down

0 comments on commit d443cd5

Please sign in to comment.