updated covariance calculation in Tractor, more robust to overlapping sources #2
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.
Previously, if any totally overlapping pairs exist in a given cutout, we would lose information for all sources being photometered simultaneously in the cutout even if they are well resolved from the degenerate pair. This happens because a fisher information matrix (FIM) is constructed for each given cutout, which is later inverted to compute the covariance matrix. The matrix inversion fails if any models are dependent due to perfectly overlapping PSFs.
In this update, totally covarying sources are combined into a single model in the FIM, allowing the matrix inversion to proceed despite any degenerate models in a given cutout. These degenerate sources are being tracked using a overlap dictionary, so that we later assign NaNs to the their flux uncertainties. In this way, we are still able to extract unbiased photometry from other non-degenerate sources in the cutout.
For more detailed tests and validation, please refer to the slides I put together.