INM-6 / lif_meanfield_tools

LIF Meanfield Tools
GNU General Public License v3.0
4 stars 7 forks source link

Reproduction of Fig. 8 in Sanzeni, Histed, Brunel 2020 #61

Closed AlexVanMeegen closed 3 years ago

AlexVanMeegen commented 3 years ago

Adds an example script to reproduce the first column of Fig. 8 in Sanzeni, Histed, Brunel 2020.

Two adjustments of the _firing_rate_integration function were necessary: 1) The possibility to start the algorithm from an arbitrary initial guess nu_0 (it defaults to the previous choice of zero rates). 2) Using least squares to find unstable fixed points. To this end, I added a new argument fixpoint_methodwhich gets passed through using **kwargs.

moritzlayer commented 3 years ago

I added the option of passing any additional kwargs to the firing rate wrapper functions and added a test for each fixed point integration method.

Thanks for revoking the changes in old_code. The code is anyway going to be removed and is only kept for transferring the code to the new framework.

Are you still working on the code? Otherwise I would merge the PR now.

AlexVanMeegen commented 3 years ago

Thanks for adding the kwargs in the wrapper functions (was not sure whether you want to do this on the high level interface) and documenting it. Also thanks for adding the tests, I should have done that..

From my side, this is ready to merge. I only noticed the unwanted changes in the old_code (git was surprisingly clever during the mere) when checking the PR, that's why this change came so late.

Is the docstring of _firing_rate_integration understandable? If not please feel free to improve to your liking, I think an external view on this is always helpful.

moritzlayer commented 3 years ago

Now I made the docstring of _firing_rate_integration a little bit more standard. Could you add a short sentence to t_max_ODE and maxiter_ODE? I think I cannot explain what they are doing exactly.

AlexVanMeegen commented 3 years ago

Thanks! I completed the docstring. Is it understandable now?

moritzlayer commented 3 years ago

Looks good to me!

AlexVanMeegen commented 3 years ago

Thanks for yet another constructive PR process!