Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assume missing off-diagonal covariance values are zero #98

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

moeyensj
Copy link
Member

In some cases, we might have covariance matrices that have only diagonal elements defined with the off-diagonal elements missing (represented as NaNs). Some input coordinates may represent datasets that do not explicitly calculate off-diagonal (covariance) values, but we still want to be able to calculate chi2 for those coordinates using the diagonal (variance) values. In these instances, this PR modifies the residuals code to assume those missing values are zero and emits a warning when this occurs.

@moeyensj moeyensj marked this pull request as ready for review November 22, 2023 20:26
@moeyensj moeyensj force-pushed the jm/residual-covariance-fix branch from 79d20cf to 6d7c3cb Compare November 22, 2023 20:28
@moeyensj moeyensj requested a review from akoumjian November 22, 2023 20:32
Copy link
Contributor

@akoumjian akoumjian left a comment

Choose a reason for hiding this comment

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

Looks good.

adam_core/coordinates/residuals.py Outdated Show resolved Hide resolved
adam_core/coordinates/residuals.py Outdated Show resolved Hide resolved
adam_core/coordinates/residuals.py Outdated Show resolved Hide resolved
@moeyensj moeyensj force-pushed the jm/residual-covariance-fix branch from 6d7c3cb to 16677be Compare November 23, 2023 00:12
@moeyensj moeyensj force-pushed the jm/residual-covariance-fix branch from 16677be to f984edb Compare November 23, 2023 00:36
@moeyensj moeyensj merged commit ce9e31b into main Nov 23, 2023
3 checks passed
@moeyensj moeyensj deleted the jm/residual-covariance-fix branch November 23, 2023 00:49
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