Skip to content

Commit

Permalink
angle from y axis
Browse files Browse the repository at this point in the history
  • Loading branch information
kapoorlab committed Mar 24, 2024
1 parent 8788705 commit 68456df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/napatrackmater/Trackmate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2912,10 +2912,10 @@ def prob_sigmoid(x):
def angular_change(vec_mask, vec_cell):

vec = np.asarray(vec_cell) - np.asarray(vec_mask)
vec = vec / np.linalg.norm(vec)
unit_vector = np.array([1, 0, 0])
angle = np.arccos(np.clip(np.dot(vec, unit_vector), -1.0, 1.0))
angle = angle * 180 / np.pi
r = np.linalg.norm(vec)
costheta = np.clip(vec[-1] / r, -1.0, 1.0)
theta = np.arccos(costheta)
angle = np.rad2deg(theta)
return angle


Expand Down
4 changes: 2 additions & 2 deletions src/napatrackmater/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = version = "4.9.6"
__version_tuple__ = version_tuple = (4, 9, 6)
__version__ = version = "4.9.7"
__version_tuple__ = version_tuple = (4, 9, 7)

0 comments on commit 68456df

Please sign in to comment.