brainsets.utils

dandi_utils

extract_subject_from_nwb

Extract a SubjectDescription from an NWBFile

extract_spikes_from_nwbfile

Extract spikes and unit metadata from an NWBFile

download_file

Download a file from DANDI

get_nwb_asset_list

Get a list of all remote NWB assets in the given dandiset

split

generate_stratified_folds

Generates stratified train/valid/test splits using a two-stage splitting process.

generate_string_kfold_assignment

Generate deterministic per-fold train/valid/test assignments for one ID.

miscellaneous

calculate_sampling_rate

Calculates median sampling rate from an array of timestamps.