-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed and place cells #96
Comments
Hi Hannah! Yes, you're right. Out of the box The lines of code which determine the RatInABox/ratinabox/Neurons.py Lines 848 to 893 in 16375e1
So how could you model more these more realistic dependencies? I see two options:
It depends what you're interested in. The first is probably more flexibility but the second is probably slightly easier. By the way, I once made a subclass of And, of course, once made you'd be welcome to contribute either of these two models to the repo so others can use them too, if you'd like :)) |
Got it, super helpful and thanks for the fast response! I will likely work on creating a class that makes place cell activity contingent on velocity-- I'll likely have some questions so would you prefer I leave this issue open for those or close it and open a new issue/discussion if need be? Thanks again! |
Np at all. I'll leave it open for now and wait for questions |
likely dumb question that it's easier just to ask: in my class i am calling some attributes from Neurons/PlaceCells like so
But when it comes to plot_place_cell_centre I CANNOT find where that lives! If I try to call it as above:
I get the error: AttributeError: 'CombinedNeurons' object has no attribute 'plot_place_cell_centres'. I am assuming it doesnt live in the Neuron parent class but then where is it? Thanks! |
not a stupid question!
Does this help? |
great, thank you! my subclass is a subclass of PlaceCells, not just Neurons (sorry if I was unclear). I added the wrappers because I am calling the plotting functions (eg plot_rate_map) from a different main script. I (of course) tried to search but was searching on plot_place_cell_centres-- it is described in your list of plotting functions (here: RatInABox/demos/list_of_plotting_fuctions.md Line 108 in 080b4b8 Either way, all working now, so thank you!! |
Oh sorry for the misnamed plot function. I've fixed that! Yes, same as before, in RiaB As for the band at the top, I just looked into it and it seems like you have spotted a very subtle bug, thanks! It was essentially a fence-post error do with how positioned are sampled uniformly across the
|
great, thank you! if the place cells are scattered randomly across the environment, and can even be in locations where the animal has not travelled, what function does the agents position then have? i was basing my modified class off of only creating place cells when the agent is travelling at a certain speed, but if the agents position does not matter for creating place cells, the speed will then also be irrelevant |
The agent position determines the firing rate of the place cell...but not (by default) its receptive field. I'm imagining your simulation looks a bit like this: Env = Environment(params={'scale':0.4,'aspect':2.5})
Ag = Agent(Env)
#<---you probably imported a trajectory here...I'll use the inbuilt random motion model
PCs = PlaceCells(Ag, params={'n':80})
PCs.plot_place_cell_locations()
#The main simulation loop
while Ag.t < 60:
Ag.update()
PCs.update() Two plotting functions may help here:
So you see that Now you totally could make the Gaussians depend on the Or, alternatively, you could keep the Gaussians static but multiply them by a velocity-dependent term in your new cells ... # the rest of your get_state function
fr = super().get_state(evaluate_at=evaluate_at, **kwargs)
fr *= self.Agent.velocity #or something more complex Does this make sense? |
Ok got it, so place cells where the animal never visits just wont ever be activated. That's good enough for me, I think! Thank you! |
How're you getting on? I'm thinking of closing this issue if theres no more questions for now but up to you |
Doing great! I've built 4 models so far haha. Thank you! Feel free to close :) |
Hi,
I am using ratinabox to model some place cell activity. As we know, place cells are really only active representations of the animals location when the animal is moving/during theta (of course they also activate during SWRs, etc, but those dont represent the current location). I would like to look at the code that "specifies" this property but I cant find it. Would you mind directing me to the right place? Many thanks!!
The text was updated successfully, but these errors were encountered: