LASER documentation
LASER (Light Agent Spatial modeling for ERadication) is a high-performance, stochastic agent-based simulation framework for modeling the spread of infectious diseases. It supports spatial structure, age demographics, and modular disease logic using Python-based components.
The LASER framework is designed to be flexible and is composed of modular components that can be used to create custom epidemiological models. For those who want to explore disease dynamics without the need to code from scratch, the framework includes epidemiological components that are designed model diseases with non-vector transmission dynamics. These modules can be used to create anything from simple compartmental models to more complex agent-based models with spatial dynamics. The framework is open-source, so for those who want to contribute to code, contributions are welcome!
Installation
LASER is distributed as a Python package. The recommended install path for most users is through the high-level laser-generic package, which includes the core engine and all epidemiological modeling tools.
✅ Recommended for most users
To install LASER, run:
1 | |
This installs:
laser-generic: modeling framework and components (e.g., SIR, SEIR, demography, mobility)laser-core: the basic data structures used bylaser-generic
Once installed, you can start using LASER (importing components and composing a model) with:
1 2 3 | |
🛠️ For engine developers
If you are developing or modifying the model code, you can install the low-level engine directly:
1 | |
This is not required for modelers using the LASER framework via laser-generic.
Verify the install
Check your install with:
1 | |
Why uv?
uv is a modern Python package manager that is:
- Much faster than pip
- Fully compatible with
pip install - Drop-in replacement for Python environments
To install uv:
1 | |
Learn more
-
Get started
Create and run simulations.
-
Reference
Full details on all classes and functions.
-
Tutorials
An interactive tour of key features.
-
What's new
See what's in the latest releases.
Authors
- Christopher Lorton - Tech Lead, Author, Maintainer
- Kevin McCarthy - Research Lead, Author
- Paul Saxman - Author, Maintainer
- Jonathan Bloedow - Author
- Katherine Rosenfeld - Author