How kebab-mai-haddi/eeg_simulator works
Project Type and Purpose
• This is a research-oriented Python library implementing the Kinetic LGN model to simulate EEG readings.
• It ingests real EEG recordings, preprocesses them, runs a simulation, alters parameters for new brain states, and compares/plots results.
Main Architectural Components
a. Data Sources
• Sample Emotiv Recordings (folder: sample_emotiv_recordings)
• Stored simulation and real-EEG artifacts (folder: objects)
• Research documentation (folder: research_papers)
b. Data Preprocessing
• preprocessing_eeg.py cleans and normalizes raw EEG data before comparison
c. Simulation Engine
• simulation_model.py implements the Kinetic LGN model
• train_simulator_for_new_state_of_brain.xml and eeg_simulator_architecture.xml (configuration/architecture metadata)
d. Parameter Alteration
• altering.py adjusts model parameters to fit a new activity (e.g., gaming)
e. Testing & Visualization
• running_tests.py plots standard vs. simulated signals for validation
f. Configuration & Dependencies
• requirements.txt lists Python libraries (e.g., NumPy, Matplotlib)
• XML files (eeg_simulator_flow_of_control.xml) describe internal control flow
Relationships and Data Flow
1. Real EEG Input → Preprocessor
2. Simulation Engine ← Parameters
3. Comparison & Validation
4. Artifacts Storage
• simulation outputs and real EEG arrays stored/loaded in objects/
Architectural Patterns & Principles
• Pipeline pattern: Data flows through stages (Load → Preprocess → Simulate → Analyze)
• Single Responsibility: Each script has one clear purpose (simulation, alteration, preprocessing, testing)
• Config-Driven: XML files define parameters and control flow, enabling experimentation without code changes
Essential Elements
• Clear labels for each Python script and directory.