INM-6 / lif_meanfield_tools

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

Fix normalization of sensitivity measure #55

Closed AlexVanMeegen closed 3 years ago

AlexVanMeegen commented 3 years ago

Addresses #50. Use scipy.linalg.eig to get left eigenvectors instead of np.linalg.eig and np.linalg.inv which implicitly assumes that the eigenvalues are nondegenerate.

This does not affect the sensitivity_measure.py example because the eigenvalues are not degenerate.

AlexVanMeegen commented 3 years ago

Just to be clear: I don't think this is a relevant problem. It is safer but I guess the effective connectivity is always normal. The main motivation is to match the code with the corresponding equation (7) in the paper.

moritzlayer commented 3 years ago

Looks good to me. As soon as the tests are merged and provided all tests still pass (which I strongly suppose) this PR can be merged.

moritzlayer commented 3 years ago

Hey @AlexVanMeegen, I would like to add the updated fixture data, but you first need to allow the maintainers to edit the PR.

AlexVanMeegen commented 3 years ago

Weird, the box is ticked: image Is there anything else I need to do?

moritzlayer commented 3 years ago

Sorry it was a mistake on my side. I was working in the wrong local repository...

AlexVanMeegen commented 3 years ago

No worries. Thanks for merging. And big hat tip for the integration test PR, impressive work!