@@ -128,25 +128,19 @@ def update(frame):
128128# ^^^^^^^^^^^^^^^^^^
129129step = 1 / 60.0
130130
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-
137131t_start , t_end = n .period
138132dt = 14
139133
140134shape = (n .obs .size , 2 )
141135# Forward run
142136i_target_f , pct_target_f = - ones (shape , dtype = "i4" ), zeros (shape , dtype = "i1" )
143137for 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 )
145139
146140# Backward run
147141i_target_b , pct_target_b = - ones (shape , dtype = "i4" ), zeros (shape , dtype = "i1" )
148142for 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 )
150144
151145# %%
152146fig = plt .figure (figsize = (10 , 10 ))
0 commit comments