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:
- raw
mne.io.Raw
The raw data to convert to BIDS.
- output_dir
str
The directory where the BIDS dataset will be created.
- task
str
The task name for BIDS.
- participant_id
str
The participant ID (if None, generated from filename).
- line_freq
float
The power line frequency.
- overwritebool
Whether to overwrite existing BIDS files.
- events
mne.events_data
The events array.
- event_id
dict
The event_id dictionary.
- study_name
str
The name of the study for dataset_description.json.
- autoclean_dict
dict
The run configuration, MUST include ‘participants_tsv_lock’ (a threading.Lock) for concurrent safety.
- raw
- Returns:
- bids_path
BIDSPath
The BIDS path of the converted file.
- bids_path