How bachlab/pspm works
Main Components
The system architecture should be organized into these primary components:
a. Data Import Layer
• Multiple format importers (src/Import/)
• Support for various data formats (Spike, Biopac, EDF, etc.)
• File conversion utilities
b. Core Processing Layer
• Signal processing modules
• Model implementations (GLM, DCM)
• Preprocessing pipelines
c. Analysis Layer
• Statistical analysis tools
• Model fitting components
• Data extraction modules
d. User Interface Layer
• GUI components (pspm_guide.fig/m)
• Batch processing interface
• Configuration management
Key Relationships
• Raw Data → Import Layer → Core Processing → Analysis → Results
• User Interface ↔ All Other Components (control flow)
• Configuration System → All Components (settings flow)
Specific Implementation Details
Specialized modules:
• Signal-specific processors (SCR, ECG, EMG, etc.)
• Model implementations (src/f_SCR.m, src/f_SF.m)
• Helper functions (src/helper/)
• External dependencies (src/ext/)
Hierarchical Structure
In layers from bottom to top:
Integration Points
Interfaces with:
• External file formats
• MATLAB environment
• Python integration points
• Third-party toolboxes
Key Features to Emphasize
• Modular design for extensibility
• Support for multiple data formats
• Model-based analysis pipeline
• Batch processing capabilities
• GUI and programmatic interfaces