Skip to content

Commit

Permalink
Make magnitude similarity non-dimensional
Browse files Browse the repository at this point in the history
  • Loading branch information
rchristie committed May 15, 2024
1 parent a020fb9 commit b15a051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scaffoldmaker/utils/eft_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def determineTricubicHermiteEft(mesh, nodeParameters, nodeDerivativeFixedWeights
derivative = nodeParameters[n][nd + 1]
magDerivative = magnitude(derivative)
cosineSimilarity = dot(derivative, delta) / (magDerivative * magDelta)
magnitudeSimilarity = math.exp(-math.fabs(magDerivative - magDelta))
magnitudeSimilarity = math.exp(-math.fabs((magDerivative - magDelta) / magDelta))
similarity = cosineSimilarity * magnitudeSimilarity
if math.fabs(similarity) > math.fabs(greatestSimilarity):
greatestSimilarity = similarity
Expand Down

0 comments on commit b15a051

Please sign in to comment.