Utils (autoclean.utils)#

Bids#

bids.step_convert_to_bids

Converts a single EEG data file into BIDS format with default/dummy metadata.

bids.step_sanitize_id

Generates a reproducible numeric participant ID from a filename using MD5 hashing.

bids.step_create_dataset_desc

Creates BIDS dataset_description.json file.

bids.step_create_participants_json

Creates BIDS participants.json sidecar file describing participants.tsv columns.

Config#

config.load_config

Load and validate the autoclean configuration file.

config.validate_signal_processing_params

Validate signal processing parameters for physical constraints.

config.validate_eeg_system

Validate the EEG system for a given task.

config.hash_and_encode_yaml

Hash and encode a YAML file or dictionary.

config.decode_compressed_yaml

Decode a compressed and encoded YAML string.

Database#

database.set_database_path

Set the global database path.

database.get_run_record

Get a run record from the database by run ID.

database.manage_database

Manage database operations with thread safety.

FileSystem#

file_system.step_prepare_directories

Set up and validate directory structure for processing pipeline.

Logging#

logging.configure_logger

Configure the logger based on verbosity level and output directory.

logging.message

Enhanced logging function with support for lazy evaluation and context.

logging.LogLevel

Enum for log levels matching MNE's logging levels.

Montage#

montage.load_valid_montages

Load valid montages from configuration file.

montage.get_10_20_to_gsn_mapping

Get mapping from 10-20 system to GSN-HydroCel channel names.

montage.get_gsn_to_10_20_mapping

Get mapping from GSN-HydroCel to 10-20 system channel names.

montage.convert_channel_names

Convert between 10-20 and GSN-HydroCel channel names.

montage.get_standard_set_in_montage

Get standard channel set converted to appropriate montage type.

montage.validate_channel_set

Validate and filter channel list based on available channels.