Skip to content

Support matrix population mixing in convolution scanner - #876

Open
damonbayer wants to merge 15 commits into
mainfrom
dmb-matrix-population-mixing
Open

Support matrix population mixing in convolution scanner#876
damonbayer wants to merge 15 commits into
mainfrom
dmb-matrix-population-mixing

Conversation

@damonbayer

@damonbayer damonbayer commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • support matrix-valued multipliers in new_convolve_scanner
  • document M[i, j] generically as the contribution of component j to component i, while preserving scalar and vector behavior
  • add regression tests for matrix multiplication and off-diagonal transmission
  • add an executable Quarto tutorial that explicitly presents population transmission as one application of the generic utility, covering the coupled renewal equation, M[target, source], constant and time-varying mixing, and two-population figures
  • link the tutorial from the documentation sidebar and landing page

Testing

  • uv run pytest -m 'not integration' (843 passed, 35 deselected)
  • uv run pre-commit run --files docs/index.md docs/tutorials/.pages docs/tutorials/population_mixing.qmd pyrenew/convolve.py pyrenew/latent/infection_functions.py test/test_convolve.py
  • QUARTO_PYTHON=.venv/bin/python quarto render docs/tutorials/population_mixing.qmd

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Thank you for your contribution @dylanhmorris 🚀! Your github-pages is ready for download 👉 here 👈!
(The artifact expires on 2026-09-07T19:22:05Z. You can re-generate it by re-running the workflow here.)

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.74%. Comparing base (a1d5d87) to head (7b312aa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #876   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files          59       59           
  Lines        2232     2236    +4     
=======================================
+ Hits         2204     2208    +4     
  Misses         28       28           
Flag Coverage Δ
unittests 98.74% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@damonbayer
damonbayer marked this pull request as ready for review August 28, 2026 15:10
Comment thread pyrenew/convolve.py Outdated
Comment thread pyrenew/convolve.py Outdated
Comment thread pyrenew/convolve.py Outdated
Comment thread pyrenew/convolve.py Outdated
Comment thread pyrenew/convolve.py Outdated
Comment thread pyrenew/latent/infection_functions.py Outdated

@dylanhmorris dylanhmorris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various wording tweaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants