Tutorials
These tutorials walk you through laser-measles step by step, from your first simulation to full vaccination modeling. All tutorials run in under one minute on a standard laptop — no cloud compute, GPU, or HPC cluster required.
Hardware requirements
Every tutorial is designed to run on a standard laptop or desktop with 4 GB of RAM and a modern Python installation (3.10+). If you are working in a setting with limited internet access, install laser-measles and its example dependencies while connected, then run tutorials offline.
Quick start
New to laser-measles? Start here. This single example walks through a complete spatial ABM from scenario construction to visualization.
Beginning tutorials
These tutorials cover the fundamentals of building and running models. They introduce the three model types, the scenario format, and the component system.
- Basic model — build your first compartmental model
- Model structure — understand model internals and data flow
- ABM introduction — switch to agent-based modeling
- Scenarios — construct scenario DataFrames from geographic data
Feature tutorials
These tutorials highlight specific features of the library. Each one focuses on a single capability that you can combine with others.
- Random numbers — reproducible stochastic simulations
- Creating a component — write a custom process or tracker (how-to guide)
- ABM vital dynamics — births, deaths, and aging in agent-based models
- Spatial mixing — model disease spread between patches (concepts)
- Pydantic component parameters — validated configuration with Pydantic
- State arrays — efficient array operations on agent properties
End-to-end tutorials
These tutorials combine multiple features into realistic analysis workflows.
- Vaccination — model supplementary immunization activities and evaluate campaign impact
Next steps
After completing the tutorials, explore these resources:
- Model types — explanation of the three model types and their trade-offs
- Choosing a model type — decision guide for selecting the right model
- Components — how the component system works
- Worked examples — copy-paste runnable scripts for all three models
- API reference — full details on all classes and functions
AI assistance
For those within IDM you can use our custom GPT Laser-GPT Jenner
to get help with laser-core.