You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question:
When I used Ag.import_trajectory with interpolate=False, I would get nan values in neuron output firingrate list.
Here is an example:
from ratinabox.Environment import Environment
from ratinabox.Agent import Agent
from ratinabox.Neurons import *
dt = 0.01
Env = Environment(params={"dx": 0.001})
Ag = Agent(Env)
times = [0.01, 0.02, 0.03, 0.04, 0.05]
positions = [[0.1, 0.1], [0.2, 0.2], [0.3, 0.3], [0.4, 0.4], [0.5, 0.5]]
Ag.import_trajectory(times=times, positions=positions, interpolate=False)
PCs = PlaceCells(Ag)
for i in range(int(times[-1] / dt)):
Ag.update(dt=dt)
PCs.update()
print(PCs.history["firingrate"])
I also tried interpolate=True, but I got weird values from the beginning and the end of Ag.history["vel"].
I haven't figured out how to control it, so I change to interpolate=False.
Thank you!
The text was updated successfully, but these errors were encountered:
Good spot. It was a small bug originating from the fact that dt is calculated on the fly when interpolation=False but the initial time is offset to zero, as is self.t, giving dt=0 and some divide-by-error errors when trying to calculate speeds etc.
Should be fixed now in version v1.14.1, let me know if you think otherwise.
Hi Tom,
Great to see RatInABox has become so wonderful!
I have a question:
When I used
Ag.import_trajectory
withinterpolate=False
, I would get nan values in neuron output firingrate list.Here is an example:
I also tried
interpolate=True
, but I got weird values from the beginning and the end ofAg.history["vel"]
.I haven't figured out how to control it, so I change to
interpolate=False
.Thank you!
The text was updated successfully, but these errors were encountered: