RatInABox-Lab / RatInABox

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

Fix bug and update arguments in GridCells #9

Closed PikaPei closed 1 year ago

PikaPei commented 1 year ago

This PR did:

  1. Fix the bug when initializing GridCells with "random_gridscales": False.
  2. Make non-random phase_offsets for GridCells. The offsets separate into two parts. One is organized, and the other is random. (e.g. if n=101, then 100 cells have organized phase offsets, and the last 1 cell's phase offset is random.)
TomGeorge1234 commented 1 year ago

Thank you for this very clear PR. I am happy to merge the random bug fix PR. I will also happily merge the new function you have added to set phase offsets non-randomly however please could you add a doctoring to this function so users know exactly what is happening when it is called. Once this small change is made I will merge!

Also (side note) I still can't see the figure you tried to send me. Could you send it directly to my e-mail address at tom.george.20@ucl.ac.uk.

PikaPei commented 1 year ago

Done! The docstring of GridCell is updated.

TomGeorge1234 commented 1 year ago

Ah, sorry, I meant could you add a docstring to set_phase_offsets just so people know what this function does and how

PikaPei commented 1 year ago

Oh, I see! I add the docstring and hope it is clear enough.

TomGeorge1234 commented 1 year ago

great, thanks for doing this change

TomGeorge1234 commented 1 year ago

Don't know if you still use this but the API for GridCells changes slightly in 1.7.0 (for the better!). See 1.7.0 release notes. "random_gridscale" is no longer accepted as an arg but it should be only a very minor change. Sorry for the inconvenience.

PikaPei commented 1 year ago

I just noticed this email...

Thanks for reminding me of this change! Very happy to see RatInABox becoming better and better. I also attended your talk several weeks ago, it was excellent. And congratulation again for your great eLife paper!

Best, Hsuan-Pei

Tom George @.***> 於 2023年6月7日 週三 上午3:32寫道:

Don't know if you still use this but the API for GridCells changes slightly in 1.7.0 (for the better!). See 1.7.0 release notes. "random_gridscale" is no longer accepted as an arg but it should be only a very minor change. Sorry for the inconvenience.

— Reply to this email directly, view it on GitHub https://github.com/TomGeorge1234/RatInABox/pull/9#issuecomment-1579335297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGJCWH44KMX7NYTXWD567JTXJ6AVTANCNFSM6AAAAAASQODAZ4 . You are receiving this because you authored the thread.Message ID: @.***>