AllenVisualCodingOphys2016#
- class torch_brain.datasets.AllenVisualCodingOphys2016(root=None, recording_ids=None, transform=None, split_type='poyo_plus', dirname='allen_visual_coding_ophys_2016', **kwargs)[source]#
Bases:
torch_brain.datasets.mixins.CalciumImagingDatasetMixin,torch_brain.datasets.dataset.DatasetTwo-photon calcium imaging of mouse visual cortex from the Allen Brain Observatory Visual Coding dataset, recorded during presentation of visual stimuli.
Preprocessing
To download and prepare this dataset, run
brainsets prepare allen_visual_coding_ophys_2016
- 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).
- 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_roi_ids()#
Return a sorted list of all ROI IDs across all recordings in the dataset.