Skip to content

Commit

Permalink
Merge pull request #37 from Schmetzler/master
Browse files Browse the repository at this point in the history
Adjusted curve_length_measure to function even if the mean is negative.
  • Loading branch information
cjekel authored Nov 18, 2023
2 parents 0eba2b0 + 20c9c56 commit 3ceb3a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions similaritymeasures/similaritymeasures.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ def curve_length_measure(exp_data, num_data):
xtemp = np.interp(lieq, lc_sum, x_c)
ytemp = np.interp(lieq, lc_sum, y_c)

r_sq[i] = np.log(1.0 + (np.abs(xtemp-x_e[i])/xmean))**2 + \
np.log(1.0 + (np.abs(ytemp-y_e[i])/ymean))**2
r_sq[i] = np.log(1.0 + (np.abs((xtemp-x_e[i])/xmean)))**2 + \
np.log(1.0 + (np.abs((ytemp-y_e[i])/ymean)))**2
return np.sqrt(np.sum(r_sq))


Expand Down

0 comments on commit 3ceb3a1

Please sign in to comment.