
This Python software provides a Docker-based workflow for electroencephalography (EEG) quality control, preprocessing and feature extraction. It supports reproducible research on attention-deficit/hyperactivity disorder (ADHD) in children and adolescents using the task recordings in the BALLADEER dataset. The software documents and implements the processing workflow underlying A task EEG dataset with preprocessed signals and features for ADHD research in children and adolescents. That companion resource contains 669 eligible recordings from 156 participants and 115 feature definitions or templates across seven feature families. The recordings and generated feature tables are distributed separately from this software. What the software does Raw EEG quality assessment: characterizes recording quality before preprocessing and produces structured quality summaries. Recording eligibility and correction plans: applies the supplied, frozen label-blind selection records, including recording eligibility and approved channel-interpolation actions. Conservative EEG preprocessing: processes continuous blocks without bridging acquisition gaps, applies 0.5–40 Hz filtering, harmonizes sampling to 128 Hz, and performs conditional channel interpolation and average referencing. Post-preprocessing quality assessment: calculates quality summaries and comparisons with the original recordings. EEG feature extraction: generates seven feature families using aligned, gap-aware windows of 2, 4, 8 and 16 seconds with 50% overlap, subject to each estimator's duration requirements. Output verification: checks processing lineage, cross-stage consistency and recorded checksums. The supplied selection records preserve the decisions used for the companion dataset. Reusing those records does not repeat the original manual review or establish new eligibility decisions for another cohort. Seven EEG feature families Temporal and statistical features. Conventional spectral features. Aperiodic spectral features. Complexity and fractal features. Functional connectivity features. Graph and network features. Time-frequency decomposition features. Feature definitions expand across channels, channel pairs and other indexed positions. Outputs retain calculation states and reasons for unavailable or undefined values. Duration-dependent support is explicit; for example, the configured aperiodic spectral analysis uses 8- and 16-second windows. Supported recordings, inputs and outputs The input is the original BALLADEER dataset, version 2, obtained from its version-specific Figshare record. Extract the source data before running the software. Set --input-dir to the directory that directly contains users_demographics.json and participant directories such as UB0004/, preserving the original task subdirectories and filenames. The companion Zenodo derivative dataset is an output resource, not the input to this complete reproduction workflow. The packaged workflow is configured for five BALLADEER task conditions: CogniFit cognitive assessment, Attention Robots, and Slackline levels 1, 6 and 11. Users also provide a writable output directory. The input directory is mounted read-only. Outputs include preprocessed EEG signals in MNE-FIF format, tabular feature outputs, quality summaries, calculation-state records, configuration snapshots, processing manifests and checksums. The software archive includes label-blind selection metadata with pseudonymous recording identifiers; it does not contain the original EEG recordings or the generated derivative dataset. Reproducibility and package contents The archive includes Python source code, scientific configurations, a Dockerfile, version-pinned Python dependencies, shell launchers, validation tests and documentation. Users can run individual processing stages, extract one feature family for one task, or execute the complete sequential workflow. Graph features use the corresponding connectivity outputs. SOURCE_REVISION records the development revision used as the package base. MANIFEST.sha256 identifies the packaged file contents, and PACKAGE_AUDIT.json records the package audit, including whether the build included uncommitted changes. These records should be retained when documenting the software version used in an analysis. Research and educational reuse Reproduction studies: inspect and rerun the documented processing stages underlying the companion EEG dataset. Signal-processing and feature-extraction research: study the implemented methods and develop explicitly documented extensions or comparisons. Feature-selection research: generate documented feature tables for downstream comparisons of filter, wrapper and embedded selection methods, including studies of redundancy and selection stability. Feature selection and predictive modelling are separate downstream analyses. Teaching: use focused task and feature-family runs for practical exercises in EEG quality assessment, signal processing, feature extraction, provenance and reproducible scientific computing. Getting started Read README.md and the detailed guide in docs/REPRODUCTION.md. Obtain and unpack the original BALLADEER version 2 dataset from its source repository. Follow the documented Docker build and self-test instructions. Supply the input and output directories, then choose an individual stage or the complete workflow. Verify the generated outputs and retain their manifests, configurations and checksums. The Docker workflow uses Linux containers and does not require a GPU. Complete reproduction is computationally and storage intensive; consult the packaged resource guidance before starting. Individual task and feature-family runs provide a smaller starting point. Scientific scope and limitations The supplied thresholds and preprocessing choices were selected for the BALLADEER recordings. Applying the workflow to another dataset requires adaptation and validation. Preprocessing does not guarantee artifact-free EEG, and harmonized sampling does not establish equivalence between acquisition devices or channel configurations. Downstream studies must define participant labels explicitly and account for task and device differences. Predictive evaluations should separate participants across training, validation and test partitions, with imputation, scaling and feature selection fitted within the training process. The software does not itself establish diagnostic validity or clinical utility. Related data, licensing and citation Original BALLADEER multimodal dataset, version 2. Companion dataset of preprocessed task EEG signals and extracted features. The software is distributed under the BSD 3-Clause "New" or "Revised" License. The original and derivative datasets retain their respective data licences. Please cite this software record and the relevant datasets when using them in research. Machine-readable software citation information is provided in CITATION.cff.
