This repository contains the codebase and analytical tools for my PhD project focused on the modeling of heart repolarization. It includes data processing algorithms, visualization helpers, and the core analysis scripts written in MATLAB and Python.
The repository is organized into the following main directories:
.
├── data/ # ⚠️ MUST BE POPULATED MANUALLY (see Setup below)
├── Matlab/ # MATLAB scripts and functions
│ ├── ecg analysis/ # Main PhD project directory (core repolarization models)
│ └── ... # Data processing helpers and additional functions
└── Python/ # Python utilities
├── qtripy # MATLAB to QtiPlot communication scripts
└── ... # Data visualization helpers
To run the MATLAB scripts correctly without tracking local paths in version control, you need to set up an untracked local configuration file.
-
Create a local paths file: Navigate to the
Matlab/ecg_analysis/directory and create a new file namedlocal_paths.m(this file is intentionally ignored by Git). -
Define your local data directory: Add the following line to
local_paths.m, replacing the path with the absolute path to your localdatadirectory:% local_paths.m dir_name = 'C:\path\to\your\Data';
The startup.m script is already configured to automatically detect and run this file, injecting the dir_name variable into your workspace.
To use the Python utilities, it is recommended to set up an isolated virtual environment. Follow these steps:
-
Navigate to the Python directory:
cd Python -
Create a virtual environment:
python -m venv ecg_project_venv
-
Activate the environment:
- Windows:
ecg_project_venv\Scripts\activate
- macOS / Linux:
source ecg_project_venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Environment Variables:
The project relies on specific absolute paths to locate data and external software. You need to create a .env file in your working directory and define the following variables:
# Define absolute paths for your local setup
ENV_DATA_PATH="...\Data"
ENV_QTRIPLOT_PATH="...\qtriplot.exe"