Add sector-reduced AK and error correlation plots to visualization no…#427
Open
sarahhancock wants to merge 1 commit into
Open
Add sector-reduced AK and error correlation plots to visualization no…#427sarahhancock wants to merge 1 commit into
sarahhancock wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Name and Institution (Required)
Name: Sarah Hancock
Institution: Harvard ACMG
Describe the update
This pull requst adds two new diagnostic plots to the visualization notebook using the sector summation matrix W (p × n), where rows give the fractional contribution of each sector to the prior emission estimate in each grid cell (following Nesser et al., 2024).
Sector-reduced averaging kernel (
ROI_sector_reduced_averaging_kernel.png):Computes A_red = W A W* (eq. 5) using the pseudoinverse W* to show the sensitivity of each sector's posterior estimate to the true value and the spurious information from other sectors.
Sector-reduced posterior error correlations (
ROI_sector_reduced_error_correlation.png):Derived from Ŝ_red = W Ŝ W^T (eq. 4), converted to a correlation matrix, showing the inversion's ability to separate between emission sectors.
New utility functions added to
utils.py:build_sector_weight_matrix— constructs W from prior emission fractions by sectorreduce_matrix_by_sector— applies sector reduction to A or Ŝ (eqs. 4–5)covariance_to_correlation— converts Ŝ_red to a correlation matrix