Add model description here and fill the sections below.
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.
-
Change model entry point in
pyproject.toml
Update the entry point in thepyproject.tomlfile to reflect the new model's identifier. This ensures that the model can be correctly referenced and utilized within the project.In pyproject.toml, replace "model_template" with the actual model id. It must match the name of the directory where ops.py is located.
[project.entry-points."finitewave.models"] model_template = "finitewave_models.model_template"
-
Implement
ops.pymodel equations
Implement the model equations in theops.pymodule. This module is the single source of truth for the model equations. Provide pure Python functions with scalar inputs/outputs (no NumPy arrays, no classes, no globals). Do NOT add numba/jax/torch here — the Finitewave runtime will wrap these functions for you. Stimulus and time integration are handled outside of the model. Here you only return time derivatives. -
Create 0D implementation for tests and examples
Design a zero-dimensional (0D) implementation of the model that can be used for testing and demonstration purposes. This should simplify the model to its core functionality, making it easier to validate and showcase. -
Provide at least one workable example for the model
Create a practical example that demonstrates how to use the model: model initialization, model stimulation and visualization of the model's AP. -
Implement model tests
Write unit tests to verify the correctness of the model's implementation: check model attributes and estimate AP parameters (min/max amplitude, duration) - this ensures that the model is excitable and generates the expected AP.
Paper, Authors, DOI.
python -m examples.model_examplepython -m pytest -q.
├── model_template/ # equations package (ops.py)
│ ├── __init__.py
│ └── ops.py # model equations (pure functions)
├── implementation/ # 0D model implementation
│ ├── __init__.py
│ └── model_0d.py
├── example/
│ └── model_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
Model state variables: description, units and ranges (optional)
u— ...
Parameters and their defualt values
par- ...