RatInABox-Lab / RatInABox

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

Place cell plotting bug fix (1D) #37

Closed colleenjg closed 1 year ago

colleenjg commented 1 year ago

Added a .gitignore, to automatically ignore cache files. Fixed a bug in PlaceCells.plot_place_cell_locations(): it was assuming that place cell centres were 2D, and breaking for a 1D environment.

TomGeorge1234 commented 1 year ago

Great bug fix. Thanks!

tbh I'd probably vote to leave the .gitignore out to not clutter the repo.

Re. the bug fix its totally fine as it is and I'll accept it. These are totally nit-picks but optionally if you wanted to you could use: self.Agent.Environment.dimensionality == '1D' or 2D rather than data shape to test for whether its 1D (maybe more readable). Also just a comment saying what this does.

Thanks again :))

colleenjg commented 1 year ago

Made the edits, removing the .gitignore and checking directly for the environment dimensionality!