VollanMoserAlternating2025#
- class torch_brain.datasets.VollanMoserAlternating2025(root=None, recording_ids=None, transform=None, dirname='vollan_moser_alternating_2025', **kwargs)[source]#
Bases:
torch_brain.datasets.mixins.SpikingDatasetMixin,torch_brain.datasets.dataset.DatasetNeuropixels recordings from MEC and hippocampus in rats during spatial navigation and sleep.
Rats performed various navigation tasks (open field, linear track, M-maze, wagon wheel) while neural activity was recorded from medial entorhinal cortex (MEC) and/or hippocampus (HC) using Neuropixels probes. Sleep sessions with identified SWS and REM epochs are also included. The dataset contains grid cells, head direction cells, and other spatially tuned neurons.
Preprocessing
To download and prepare this dataset, run
brainsets prepare vollan_moser_alternating_2025
Tasks: Open Field, Linear Track, M-Maze, Wagon Wheel, Sleep
Brain Regions: MEC, Hippocampus
Dataset Statistics
Subjects: 19
Total Sessions: 51 (31 Open Field, 7 Linear Track, 2 Wagon Wheel, 1 M-Maze, 1 Novel Open Field, 9 Sleep)
Recording Tech: Neuropixels
Navigation sessions (42 sessions) contain:
rec.spikesSpike timestamps and unit indices.
rec.unitsPer-unit metadata:
id,location(mec/hc),probe_id,shank_id,shank_pos,mean_rate,ks2_label,is_grid.rec.samplesAll variables on the shared 10 ms timebase (speed-filtered at 5 cm/s) in a single flat
IrregularTimeSeries:Observed tracking variables:
x– head x-position relative to arena centre (m)y– head y-position relative to arena centre (m)z– head z-position relative to floor (m)hd– 2D head direction / azimuth (rad)speed– horizontal head speed (m/s)theta– instantaneous theta phase (rad)id– decoded internal direction (rad, from the LMT model)
LMT decoded variables (for each population
{pop}inmec,hc,mec_hc):lmt_{pop}_theta– theta phase (fixed; largely duplicatestheta)lmt_{pop}_hd– head direction (fixed; largely duplicateshd)lmt_{pop}_id– internal direction (latent)lmt_{pop}_pos_x– decoded x-position (latent)lmt_{pop}_pos_y– decoded y-position (latent)
Populations not present for a given animal are NaN-padded so all sessions share the same field schema.
rec.theta_chunksTheta-cycle-binned timeseries (separate timebase, one sample per theta cycle):
id,L(log-likelihood, n_cycles x 30),P(probability, n_cycles x 30).rec.probe_channelsProbe channel geometry:
probe_id,channel_index,x_um,y_um,shank_id,connected.
Sleep sessions (9 sessions) have a fundamentally different structure and should be treated independently. They contain only:
rec.spikesSpike timestamps and unit indices within SWS/REM epochs.
rec.unitsMinimal unit metadata (
idonly).rec.domainUnion of SWS and REM epoch intervals.
None of the navigation fields (
samples,theta_chunks,probe_channels) are present on sleep sessions.References
Vollan, A. Z., Gardner, R. J., Moser, M.-B. & Moser, E. I. Left-right-alternating theta sweeps in the entorhinal-hippocampal spatial map. Dataset: EBRAINS.
- Parameters:
root (
Optional[str]) – Root directory for the dataset. Defaults toprocessed_dirfrom brainsets config.recording_ids (
Optional[list[str]]) –Recording IDs to load. Defaults to all sessions. Can be:
A list of individual recording IDs.
A string shorthand:
"all"(default),"sleep","navigation","of","lt","mmaze","ww","of_novel".A
RECORDING_IDSsub-group for finer control:from torch_brain.datasets.VollanMoserAlternating2025 import RECORDING_IDS ds = VollanMoserAlternating2025(root, recording_ids=RECORDING_IDS.navigation.of)
transform (
Optional[Callable]) – Data transformation to apply.dirname (
str) – Subdirectory for the dataset. Defaults to “vollan_moser_alternating_2025”.
- get_sampling_intervals(split=None)[source]#
Returns a dictionary of sampling intervals for each recording. This represents the intervals that can be sampled from each session.
This dictionary will be used by
torch_brain’s Samplers to know where to sample from.The default method returns intervals containing the entire domain of each recording. This behavior can be overridden by subclasses to give out custom sampling intervals.
- Returns:
Dictionary mapping recording IDs to their time domain intervals.
- apply_namespace(data, namespace)#
Apply a namespace prefix to specified nested attributes in the data.
This method modifies the data object in-place by prepending the namespace to string attributes or string arrays specified in
namespace_attributes.Can be overridden by subclasses to apply the namespace in a custom way.
- Parameters:
- Return type:
- Returns:
The modified
torch_brain.data.Dataobject (same instance, modified in-place).
- compute_average_firing_rates()#
Compute and return the average firing rates for all units in the dataset.
- Returns:
- DataFrame indexed by unit ID, containing a column ‘firing_rate’ (Hz)
with the average firing rate for each unit in the dataset.
- Return type:
pd.DataFrame
- get_recording(recording_id, _namespace='')#
Get lazy-loaded
torch_brain.data.Dataobject for a recording.- Parameters:
recording_id (
str) – The ID of the recording to load (same as fromrecording_ids())._namespace (
str) – Optional namespace prefix to apply to attributes.
- Return type:
- Returns:
Lazy
torch_brain.data.Dataobject containing the full recording.
- get_recording_hook(data)#
Hook method called after loading a recording in
get_recording().Subclasses can override this method to perform custom processing on recordings after they are loaded but before they are returned.
- Parameters:
data (
Data) – The Data object that was just loaded.
- get_unit_ids()#
Return a sorted list of all unit IDs across all recordings in the dataset.