RatInABox-Lab / RatInABox

A python package for modelling locomotion in complex environments and spatially/velocity selective cell activity.
MIT License
172 stars 31 forks source link

Update FieldOfViewNeurons.py #67

Closed Alxec closed 1 year ago

Alxec commented 1 year ago

Fixed the bug that FoV Neurons with BVC decreased their firing rate with increase of the wall distance. It was because cell_fr_norm was calculated during BVC initialization when the cells tuning parameters are not changed yet.

TomGeorge1234 commented 1 year ago

That's great, thanks for catching this and for the PR! Worth bearing in mind, I guess, that the real way would be to calculate the firing rates at all positions and heading directions and normalise by the max of that but it sounds like a pain which isn't worth going through to me.

By the way, we're soon going to refactor this a bit so FoV_OVCs and FoV_BVCs aren't the same class. It should affect your workflow too much but worth being aware, tagging @mehulrastogi so he's aware of this change.