@@ -128,25 +128,19 @@ def update(frame):
128
128
# ^^^^^^^^^^^^^^^^^^
129
129
step = 1 / 60.0
130
130
131
- x , y = meshgrid (arange (24 , 36 , step ), arange (31 , 36 , step ))
132
- x0 , y0 = x .reshape (- 1 ), y .reshape (- 1 )
133
- # Pre-order to speed up
134
- _ , i = group_obs (x0 , y0 , 1 , 360 )
135
- x0 , y0 = x0 [i ], y0 [i ]
136
-
137
131
t_start , t_end = n .period
138
132
dt = 14
139
133
140
134
shape = (n .obs .size , 2 )
141
135
# Forward run
142
136
i_target_f , pct_target_f = - ones (shape , dtype = "i4" ), zeros (shape , dtype = "i1" )
143
137
for t in range (t_start , t_end - dt ):
144
- particle_candidate (x0 , y0 , c , n , t , i_target_f , pct_target_f , n_days = dt )
138
+ particle_candidate (c , n , step , t , i_target_f , pct_target_f , n_days = dt )
145
139
146
140
# Backward run
147
141
i_target_b , pct_target_b = - ones (shape , dtype = "i4" ), zeros (shape , dtype = "i1" )
148
142
for t in range (t_start + dt , t_end ):
149
- particle_candidate (x0 , y0 , c , n , t , i_target_b , pct_target_b , n_days = - dt )
143
+ particle_candidate (c , n , step , t , i_target_b , pct_target_b , n_days = - dt )
150
144
151
145
# %%
152
146
fig = plt .figure (figsize = (10 , 10 ))
0 commit comments