Skip to content

Commit

Permalink
gif gridding debug
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyangkang committed Jun 3, 2024
1 parent e26c34b commit 7b8fd27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stemflow/utils/plot_gif.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ def animate(i, norm, log_scale=log_scale):
temporal_value = np.array(sub[Temporal1].values)[0]

g1 = np.digitize(sub[Spatio1], lng_gird, right=True)
g1 = np.where(g1 >= np.max(lng_gird), np.max(lng_gird) - 1, g1)
g1 = np.where(g1 >= np.max(lng_gird), np.max(lng_gird) - 1, g1).astype("int")

g2 = np.digitize(sub[Spatio2], lat_gird, right=True)
g2 = np.where(g2 >= np.max(lat_gird), np.max(lat_gird) - 1, g2)
g2 = np.where(g2 >= np.max(lat_gird), np.max(lat_gird) - 1, g2).astype("int")

sub.loc[:, f"{Spatio1}_grid"] = g1
sub.loc[:, f"{Spatio2}_grid"] = g2
Expand Down

0 comments on commit 7b8fd27

Please sign in to comment.