Metadata-Version: 2.4
Name: finitewave-model-barkley
Version: 0.6.0
Summary: Barkley model.
License: MIT
License-File: LICENSE
Keywords: cardiac,electrophysiology,finitewave,model
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.10
Description-Content-Type: text/markdown

## Barkley Finitewave model

The Barkley model is a simplified two-variable reaction–diffusion system
originally developed to study wave propagation in excitable media. While it is 
not biophysically detailed, it captures essential qualitative features of 
cardiac-like excitation dynamics such as spiral waves, wave break, and reentry.

This model implementation can be used separately from the Finitewave, allowing for standalone simulations and testing of the model dynamics without the need for the entire framework.

### Reference
Barkley, D. (1991).
A model for fast computer simulation of waves in excitable media.
Physica D: Nonlinear Phenomena, 61-70.

DOI: https://doi.org/10.1016/0167-2789(86)90198-1.

### How to use (quickstart)
```bash
python -m examples.barkley_example
```

![Alt text](barkley_ap.png)

### How to test
```bash
python -m pytest -q
```

### Repository structure
```text
.
├── barkley/                 # equations package (ops.py)
│   ├── __init__.py
│   └── ops.py               # model equations (pure functions)
├── implementation/          # 0D model implementation
│   ├── __init__.py
│   └── barkley_0d.py
├── example/
│   └── barkley_example.py   # minimal script to run a short trace
├── tests/
│   └── test.py              # smoke test; reproducibility checks
├── .gitignore
├── LICENSE                  # MIT
├── pyproject.toml           # configuration file
└── README.md                # this file
```

### Variables
- `u` — Transmembrane potential (dimensionless).
- `v` — Recovery variable (dimensionless).

### Parameters
- `a = 0.75`   - Threshold-like parameter controlling excitability.
- `b = 0.02`   - Recovery time scale.
- `eps = 0.02` - Controls sharpness of the activation term (nonlinear gain).
