bids.step_convert_to_bids#

autoclean.utils.bids.step_convert_to_bids(raw, output_dir, task='rest', participant_id=None, line_freq=60.0, overwrite=False, events=None, event_id=None, study_name='EEG Study', autoclean_dict=None)[source]#

Converts a single EEG data file into BIDS format with default/dummy metadata. Handles concurrent access to participants.tsv using a threading.Lock passed via autoclean_dict. Ensures specific column order and dtype=object for the TSV.

Parameters:
rawmne.io.Raw

The raw data to convert to BIDS.

output_dirstr

The directory where the BIDS dataset will be created.

taskstr

The task name for BIDS.

participant_idstr

The participant ID (if None, generated from filename).

line_freqfloat

The power line frequency.

overwritebool

Whether to overwrite existing BIDS files.

eventsmne.events_data

The events array.

event_iddict

The event_id dictionary.

study_namestr

The name of the study for dataset_description.json.

autoclean_dictdict

The run configuration, MUST include ‘participants_tsv_lock’ (a threading.Lock) for concurrent safety.

Returns:
bids_pathBIDSPath

The BIDS path of the converted file.