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

Spikes are sliced twice consecutively when plotting timeseries. #75

Closed colleenjg closed 11 months ago

colleenjg commented 11 months ago

In Neurons.py, in the plot_rate_timeseries() method definition, the spikes are sliced twice with the same indexing slice:

L198: spike_data = np.array(self.history["spikes"][slice])

L204: spike_data = spike_data[slice, chosen_neurons] https://github.com/TomGeorge1234/RatInABox/blame/0180dd0f27c0ca739eb533de4a55c2e4d5f1fb5e/ratinabox/Neurons.py#L204

L204 should be spike_data = spike_data[:, chosen_neurons]

TomGeorge1234 commented 11 months ago

great spot, thanks I'll push a fix and close this once I've done so

TomGeorge1234 commented 11 months ago

fixed 👍🏼