osmose.community_metricsΒΆ
Community-level ecosystem-state diagnostics from OSMOSE output.
Adds the canonical Sheldon (body-mass) normalized biomass spectrum (NBSS) and a suite of community indicators β Mean Trophic Level / Marine Trophic Index, community totals + size diversity, and the Warwick Abundance-Biomass Comparison (ABC) W-statistic β on top of the length spectrum in osmose.size_spectrum.
The Sheldon spectrum needs body MASS; OSMOSE writes by-LENGTH size classes, so we convert per species via the config length-weight law W = a * L^b. Each unit fails soft (records a note, returns degraded values) rather than raising past the orchestrator. See docs/superpowers/specs/2026-06-17-community-size-spectrum-extension-design.md.
Functions
|
Assemble the full community diagnostics bundle; each unit degrades to None on missing input (recording a top-level note) rather than raising. |
|
Warwick Abundance-Biomass Comparison W-statistic + cumulative dominance curves. |
|
Canonical Sheldon NBSS over equal log2 (octave) body-mass bins + derived metrics. |
|
Biomass-weighted community Mean Trophic Level + Marine Trophic Index. |
|
Markdown summary of whichever community-diagnostic sections are present. |
Classes
|
|
|
|
|
|
|