EEG source localization with DK atlas regions
Project description
AutoClean EEG2Source
EEG source localization with Desikan-Killiany (DK) atlas regions. This package converts EEG epochs to source-localized data using the DK brain atlas.
Features
- Convert EEG epochs to source-localized data with DK atlas regions
- Memory-efficient processing with monitoring
- Support for EEGLAB .set file format
- Batch processing capabilities
- Command-line interface
Installation
Requirements
- Python >= 3.8
- MNE-Python 1.6.0
- nibabel
- numpy
- pandas
- loguru
- psutil
Install from source
pip install .
Install in development mode
pip install -e .
Install with development dependencies
pip install -e ".[dev]"
Command-Line Usage
The package provides a command-line interface for processing EEG files.
Process EEG files
Convert EEG epochs to source-localized data:
autoclean-eeg2source process input.set --output-dir ./results
Process multiple files in a directory:
autoclean-eeg2source process ./data --output-dir ./results --recursive
Validate files
Check if EEG files are valid:
autoclean-eeg2source validate ./data
Get file information
Display information about an EEG file:
autoclean-eeg2source info input.set
Advanced options
autoclean-eeg2source process input.set \
--output-dir ./results \
--montage "GSN-HydroCel-129" \
--resample-freq 250 \
--lambda2 0.1111 \
--max-memory 4.0 \
--log-level INFO
Python API Usage
from autoclean_eeg2source import SequentialProcessor, MemoryManager
# Initialize components
memory_manager = MemoryManager(max_memory_gb=4)
processor = SequentialProcessor(
memory_manager=memory_manager,
montage="GSN-HydroCel-129",
resample_freq=250
)
# Process a file
result = processor.process_file("input.set", "./output")
if result['status'] == 'success':
print(f"Output saved to: {result['output_file']}")
else:
print(f"Processing failed: {result['error']}")
Output Format
The package outputs:
.setfiles with DK atlas regions as channels (68 regions)_region_info.csvwith region metadata (names, hemispheres, positions)
Building and Publishing
Build the package
python -m build
Upload to TestPyPI
python -m twine upload --repository testpypi dist/*
Install from TestPyPI
pip install --index-url https://test.pypi.org/simple/ --no-deps autoclean-eeg2source
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoclean_eeg2source-0.1.1.tar.gz.
File metadata
- Download URL: autoclean_eeg2source-0.1.1.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdaaca774a82fe867995d2d903232caa9ad147d81189341a281f4617140efb99
|
|
| MD5 |
5f75486a00d0552af4728ea1e21d54f7
|
|
| BLAKE2b-256 |
1c3e7fd6abae558807833e2af6d7925fcab7b06afccf1c906875a1cc2ca89a1d
|
File details
Details for the file autoclean_eeg2source-0.1.1-py3-none-any.whl.
File metadata
- Download URL: autoclean_eeg2source-0.1.1-py3-none-any.whl
- Upload date:
- Size: 52.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f55ba7648d5d43f67aa1558b3a4d88fe7a5d22f0c7d50d946abc46e0975aaba5
|
|
| MD5 |
b82dca233435507e8614e742e71cfe33
|
|
| BLAKE2b-256 |
556b944656981aec0d05211c4a777752831ea20658952c2fda9aded59b174ee2
|