Pre-built queries for common diagnostic plots and analysis.
All methods return pandas DataFrames for easy integration with matplotlib, seaborn, and other scientific Python libraries.
Attributes
Name
Type
Description
registry
The RunRegistry to query.
Examples
>>> queries = DiagnosticQueries(registry)>>># Time series at a location>>> df = queries.get_cell_timeseries(... longitude=-116.1,... latitude=33.9,... variable="treeCount",... )
Compute coefficient of variation for each replicate’s time series.
For each replicate: 1. Get spatially-averaged values at each timestep (after burn_in) 2. Compute CV = std(values) / mean(values) 3. Return inf if mean < extinction_threshold (extinction)
This is the correct way to measure stability - computing CV per replicate then averaging, rather than computing CV on cross-replicate means which can hide instability when replicates oscillate out of phase.
Parameters
Name
Type
Description
Default
variable
str
Export variable to analyze (e.g., “totalCover”)
required
run_hash
str
Run hash to filter by
required
burn_in
int
Steps to skip before measuring (default: 0)
0
extinction_threshold
float
Mean below this is considered extinction (default: 0.01)
0.01
Returns
Name
Type
Description
dict[str, Any]
Dict with keys:
dict[str, Any]
- ‘mean_cv’: Average CV across replicates (inf if any extinct)
dict[str, Any]
- ‘replicate_cvs’: List of per-replicate CVs (inf for extinct)
dict[str, Any]
- ‘n_replicates’: Number of replicates
dict[str, Any]
- ‘n_timesteps’: Timesteps per replicate after burn-in
dict[str, Any]
- ‘extinct_replicates’: List of replicate indices with extinction