Processing¶
process_dataset(raw_path, out_root_path, config_override=None, force_flag=False, strict_flag=False)
¶
Orchestrate the conversion of a full raw dataset into BIDS format.
This function manages the end-to-end workflow: merging configurations, discovering metadata, and crawling for EEG recordings. It assumes the source directory contains a valid metadata spreadsheet and description file.
The process will automatically create the output BIDS directory if it does not exist and will overwrite existing files during the conversion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw_path
|
Path
|
The directory containing the source raw data and metadata files. |
required |
out_root_path
|
Path
|
The destination directory where the BIDS structure will be built. |
required |
config_override
|
dict
|
User-defined settings to override the default package configuration. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
Executes the conversion pipeline and writes the output to disk. |
Source code in src/rs_bidsify/processing.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
process_recording(bids_path, recording, dataset_spec, subject_info, config)
¶
Process and export a single recording instance to BIDS format.
This function handles the transformation of an individual EEG file (one task/run). It specializes the dataset-level template for the specific subject, enriches the MNE object, and writes the resulting files to the BIDS structure. Post-export, it enriches the task-specific JSON sidecar and channels TSV.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bids_path
|
BIDSPath
|
The target BIDS destination for this recording. This object must specify the subject, task, and root directory, ensuring the data is written to the correct entity-linked location. |
required |
recording
|
RecordingMetadata
|
Metadata for this specific recording session (e.g., file path, subject ID, and task name). |
required |
dataset_spec
|
DescriptionSpec
|
The base metadata specification for the entire dataset. |
required |
subject_info
|
SubjectMetadata
|
Demographic and clinical metadata for the subject associated with this recording. |
required |
config
|
dict
|
Configuration settings, including 'output_EEG_format' and 'include_extras'. |
required |
Returns:
| Type | Description |
|---|---|
None
|
Writes the processed recording and task-specific metadata to disk. |