eegproc.data.to_csv module
Convert downloaded public datasets to CSV: python -m eegproc.data.to_csv.
- eegproc.data.to_csv.convert_dataset(dataset, input_path, output_path, *, chunksize=100000, overwrite=False, labels_path=None, source_label_kind='cowen', amigos_baseline_samples=640)[source]
Write a dataset CSV or CSV.gz and return its row count.
Input is a dataset directory, or a single AMIGOS/DREAMER MAT or DEAP DAT file. DREAMER directories can contain either the three legacy CSV exports or DREAMER.mat. CSV exports take precedence if dreamer_eeg.csv[.gz] exists. Text/CSV readers stream chunks; MATLAB and DEAP readers load one source file at a time. Cowen loads only its small rating matrices.
A temporary output is published only after successful conversion. Existing files require
overwrite=True. DEAP DAT files use Python pickle and must come from a trusted source. Signals are not filtered or standardized; the native DREAMER MAT reader resamples ECG onto the EEG sampling grid.- Parameters:
dataset (
str)input_path (
str|Path)output_path (
str|Path)chunksize (
int, default:100000)overwrite (
bool, default:False)labels_path (
str|Path|None, default:None)source_label_kind (
str, default:'cowen')amigos_baseline_samples (
int, default:640)
- Return type:
int