djanloo / quilt

A multiscale neural simulator
MIT License
0 stars 0 forks source link

(too much) Discontinuous first derivative in `ContinuousRK` #19

Closed djanloo closed 1 month ago

djanloo commented 2 months ago

Just after #18 (about continuity of the interpolation), It must be noted that the first derivative is still a bit too jumpy IMO.

bug_NCE3

Here I will gather all I found about this issue.

djanloo commented 1 month ago

What the hell is this

Cortical only system: bug_NCE4

On the last moments of the simulation i get

[2024-06-26 18:00:40] - PID 125812462774080 - ERROR: NCERK interpolated at theta = 1 is different from the next point.
Interpolating from n = 307
X[n] = 0.00424611
X[n+1] = 0.00454819
interpolation(theta=1) =0.00457161
delta(theta = 1) = 0.000325495

So probably there is still some kind of error that builds up over time.

Furthermore, the system is noiseless, so the interpolation between timesteps should be much smoother.

bug_NCE5

djanloo commented 1 month ago

There is something fundamentally wrong here:

bug_NCE7 bug_NCE6

The interpolation seems to shift brutally in time.

djanloo commented 1 month ago

My bad, I was plotting old data bug_NCE8 bug_NCE9

Now the overall trend seems to be correct. Noise buildup will be matter of another issue (#20 ).