Command Line Interface (pyavs.cli)

The CLI module provides command-line tools for common pyAVS workflows.

CLI Commands

Command-line interface for pyAVS package.

This module provides command-line tools for common pyAVS workflows, making it easy to process data without writing custom scripts.

pyavs.cli.main()[source]

Main CLI entry point.

pyavs.cli.configure_command(args)[source]

Configure the data path (one-time per machine).

pyavs.cli.check_data_command(args)[source]

Check data availability command.

pyavs.cli.preprocess_command(args)[source]

Preprocessing command.

pyavs.cli.create_epochs_command(args)[source]

Create epochs command.

pyavs.cli.source_reconstruction_command(args)[source]

Source reconstruction command.

pyavs.cli.batch_command(args)[source]

Batch processing command.

pyavs.cli.setup_command(args)[source]

Setup command (legacy — delegates to configure).

pyavs.cli.load_config(config_path: str)[source]

Load configuration from file.

Usage Examples

Check Data Availability

pyavs check-data --subject 1 --session 1 --data-path /path/to/data

Preprocess Data

# MEG + eye tracking preprocessing
pyavs preprocess --subject 1 --session 1 --blocks 1 2 3 --apply-ica

# Eye tracking only
pyavs preprocess --subject 1 --session 1 --include-meg false

Create Epochs

# Fixation-locked MEG epochs
pyavs create-epochs --subject 1 --session 1 \
    --event-type fixation --sensor-type meg \
    --tmin -0.2 --tmax 0.5 --baseline -0.2 0 --save

Source Reconstruction

# Beamformer source reconstruction
pyavs source-reconstruction --subject 1 --session 1 \
    --method beamformer --roi-labels V1 V2 V4 --save-source-data

Batch Processing

# Process multiple subjects
pyavs batch --subjects 1 2 3 4 5 --sessions 1 2 \
    --workflow preprocess --parallel --n-jobs 4

Setup Configuration

# Create configuration file
pyavs setup --data-path /path/to/avs/dataset \
    --freesurfer-dir /usr/local/freesurfer/subjects \
    --create-config