-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted to latest changes in py-pde (#55)
* Bumped py-pde required version to 0.35 * Removed the dependence on `grid.distance_real` and `grid.polar_coordinates_real`
- Loading branch information
1 parent
9758bab
commit 7082f91
Showing
7 changed files
with
93 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,12 @@ | |
DropletTrack | ||
DropletTrackList | ||
.. codeauthor:: David Zwicker <[email protected]> | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import functools | ||
import json | ||
import logging | ||
from typing import Callable, Literal | ||
|
@@ -448,7 +448,7 @@ def plot_positions( | |
segments = [] | ||
for p1, p2 in zip(xy[:-1], xy[1:]): | ||
dist_direct = np.hypot(p1[0] - p2[0], p1[1] - p2[1]) | ||
dist_real = grid.distance_real(p1, p2) | ||
dist_real = grid.distance(p1, p2, coords="cartesian") | ||
close = np.isclose(dist_direct, dist_real) | ||
segments.append(close) | ||
|
||
|
@@ -568,7 +568,7 @@ def match_tracks( | |
if grid is None: | ||
metric: str | Callable = "euclidean" | ||
else: | ||
metric = grid.distance_real | ||
metric = functools.partial(grid.distance, coords="cartesian") | ||
points_prev = [track.last.position for track in tracks_alive] | ||
points_now = [droplet.position for droplet in emulsion] | ||
dists = distance.cdist(points_prev, points_now, metric=metric) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ matplotlib>=3.1.0 | |
numpy>=1.22.0 | ||
numba>=0.48.0 | ||
scipy>=1.4.0 | ||
py-pde>=0.34 | ||
py-pde>=0.35 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters