API Reference#
Look through specific module or search through the entire list of APIs.
- torch_brain.batching
- torch_brain.data
- torch_brain.datasets
- torch_brain.models
- torch_brain.nn
- torch_brain.pipeline
- torch_brain.pipeline.openneuro
- torch_brain.samplers
- torch_brain.transforms
- torch_brain.utils
- torch_brain.utils.bids
- torch_brain.utils.dandi
- torch_brain.utils.mne
- torch_brain.utils.openneuro
- torch_brain.utils.s3
- torch_brain.utils.signal
- torch_brain.utils.split
- torch_brain.utils.stitcher
All APIs
Object |
Description |
|---|---|
Extension of PyTorch’s |
|
Wrap an object to specify that it (or any of its members) should be stacked |
|
Wrap an object to specify that it (or any of its members) should be padded to |
|
Wrap an object to specify that it (or any of its members) should be padded to |
|
Wrap an object to specify that it (or any of its members) should be padded to |
|
Wrap an object to specify that it (or any of its members) should be padded to |
|
Wrap an array or tensor to track the batch_index. |
|
Wrap an array or tensor to specify that its padding mask should be tracked. |
|
Wrap an array or tensor to specify that its padding mask should be tracked. This |
|
Wrap an array or tensor to specify that its padding mask should be tracked. This |
|
Wrap an array or tensor to specify that its padding mask should be tracked. This |
|
A dictionary of arrays that share the same first dimension. The number of |
|
A flexible container for other data objects such as |
|
An interval object is a set of time intervals each defined by a start time and |
|
An irregular time series is defined by a set of timestamps and a set of |
|
A regular time series is the same as an irregular time series, but it has a |
|
Lazy variant of |
|
Lazy variant of |
|
Lazy variant of |
|
Lazy variant of |
|
A container for storing brainset metadata. |
|
A container for storing recording device metadata. |
|
A container to store experimental session related metadata. |
|
A container for storing subject related metadata. |
|
Concatenates multiple time series objects into a single object. |
|
Returns the default serialization map used when saving |
|
PyTorch Dataset for loading time-slices of neural data recordings from HDF5 files. |
|
Index for accessing a specific time interval of a recording within a |
|
Dataset that composes multiple |
|
Base class for OpenNeuro datasets. |
|
Mixin class for |
|
Mixin class for |
|
Mixin class for |
|
Motor cortex (M1 and PMd) spiking activity and reaching kinematics from four macaques |
|
Curated spiking neural activity datasets from the Neural Latents Benchmark |
|
Motor cortex (M1 and PMd) spiking activity and reaching kinematics from 2 monkeys |
|
Motor cortex (M1 and S1) spiking activity and reaching kinematics from 2 monkeys |
|
Neuropixels recordings from MEC and hippocampus in rats during spatial navigation |
|
Shirazi HBN Resting State 1 (HBN-R1) iEEG Dataset (OpenNeuro DS005505). |
|
Two-photon calcium imaging of mouse visual cortex from the Allen Brain |
|
Neuroprobe 2025 iEEG benchmark dataset. |
|
Kochi Visual Naming iEEG Dataset (OpenNeuro DS006914). |
|
Klinzing Sleep iEEG Dataset (OpenNeuro DS005555). |
|
Sleep-EDF Database Expanded containing 197 whole-night polysomnographic sleep recordings. |
|
Embedding layer with a vocabulary that can be extended. Vocabulary is saved along |
|
Rotary time/positional embedding layer. This module is designed to be used with |
|
Sinusoidal time/position embedding layer. |
|
Cross-attention layer with rotary positional embeddings. |
|
Self-attention layer with rotary positional embeddings. |
|
Abstract base class for defining processing pipelines. |
|
Abstract base class for OpenNeuro dataset pipelines. |
|
Samples fixed-length windows randomly from a collection of time intervals. |
|
Samples fixed-length windows sequentially in a deterministic, reproducible order. |
|
Samples complete trial intervals without windowing. |
|
Wraps any sampler for use in distributed evaluation without dropping samples. |
|
Distributed sliding-window sampler that co-locates windows for prediction stitching. |
|
Compose several transforms together. All transforms will be called sequentially, |
|
Apply a single transformation randomly picked from a list. |
|
Conditionally apply a single transformation based on whether a condition is met. |
|
Augmentation that randomly drops units from the sample. By default, the number |
|
Triangular distribution with a peak at mode_units, going from min_units to |
|
<no summary> |
|
<no summary> |
|
<no summary> |
|
Bin spike events into fixed-width time bins. |
|
Drop units based on the mask_fn given in the constructor. |
|
Keep/drop units based on the keyword/regex given in the constructor. |
|
Check if timestamps are in any of the intervals in the Interval object. |
|
Adds a string prefix to each element of a numpy string array. |
|
Bins spikes into time bins of size bin_size. If the total time spanned by |
|
Discover all EEG recordings inside a BIDS dataset or list of files. |
|
Discover all iEEG recordings inside a BIDS dataset or list of files. |
|
Group BIDS-compliant recordings by specified fixed entities. |
|
Check if EEG data files corresponding to a BIDS recording_id exist in the BIDS root directory. |
|
Check if iEEG data files corresponding to a BIDS recording_id exist in the BIDS root directory. |
|
Build a mne_bids.BIDSPath for a given recording_id, modality, and BIDS root directory. |
|
Load the JSON sidecar file for a given BIDS file. |
|
Load participants.tsv data from a BIDS root directory. |
|
Retrieve demographic information (age, sex) for a given subject from a participants DataFrame. |
|
Extract a |
|
Extract spikes and unit metadata from an NWBFile |
|
Download a file from DANDI |
|
Get a list of all remote NWB assets in the given dandiset |
|
Extract the measurement date from MNE Raw recording data. |
|
Concatenate a list of MNE Raw objects into one, validating metadata. |
|
Extract entire time-series signal from an MNE Raw object. |
|
Extract channel metadata from an MNE Raw object, with support for custom channel name, type, and position mappings. |
|
|
str(object=’’) -> str |
Construct an S3 URL prefix for a recording. |
|
Download dataset_description.json from OpenNeuro S3. |
|
Download all files matching an S3 prefix pattern for a recording. |
|
Fetch the latest snapshot tag for an OpenNeuro dataset. |
|
Fetch all filenames for a given OpenNeuro dataset using AWS S3. |
|
Fetch and parse participants.tsv from OpenNeuro S3. |
|
Fetch species metadata for an OpenNeuro dataset from GraphQL. |
|
Get a cached S3 client configured for anonymous access to public buckets. |
|
List all object keys under a prefix (excludes directories). |
|
Download all files matching a prefix pattern. |
|
Download all files matching an S3 URL prefix pattern. |
|
Downsample wideband signal to LFP sampling rate. |
|
Extract bands from LFP |
|
Convert a cube of threshold crossings to a list of trials and units. |
|
Generates stratified train/valid/test splits using a two-stage splitting process. |
|
Generate deterministic per-fold train/valid/test assignments for one ID. |
|
Pools values that share the same timestamp using mean or mode operations. |