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

Changes to _get_iv to compute covariant errors #106

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gemmahuai
Copy link
Collaborator

Added changes to the function _get_iv in optimize.py

  • placed each unit flux model in a corresponding image
  • calculated Fisher information matrix F
  • found the covariance matrix C by inverting F
  • read off the variance from the diagonal values in C.

The algorithm passed the z-score test where as I fixed the primary source at the center and marched a secondary source along the central x-axis (approaching, overlapping, and then leaving the primary source), I repeated the tractor fit 500 times and plotted a histogram of z-score for each position. The z-score histogram follows a Gaussian of sigma~1 distribution except when the two sources completely overlap. So this is fairly stable. For a three-source test, it's also reasonable.

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 45.88%. Comparing base (48fbef9) to head (7c8e3c8).
Report is 1 commits behind head on main.

Files Patch % Lines
tractor/optimize.py 0.00% 21 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #106      +/-   ##
==========================================
- Coverage   45.99%   45.88%   -0.12%     
==========================================
  Files          27       27              
  Lines        7085     7103      +18     
==========================================
  Hits         3259     3259              
- Misses       3826     3844      +18     

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

@dstndstn
Copy link
Owner

dstndstn commented Nov 5, 2023

don't worry about the code-coverage report :)

@gemmahuai
Copy link
Collaborator Author

Okay, thanks! Please let me know if there is any problem.

@coveralls
Copy link

coveralls commented Jul 29, 2024

Coverage Status

coverage: 45.88% (-0.1%) from 45.994%
when pulling 7c8e3c8 on variance_update
into 48fbef9 on main.

@gemmahuai
Copy link
Collaborator Author

Hi Dan, I updated the Fisher matrix calculation. Now it's faster by 10 times. Hopefully the version is going to pass all tests. :)

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.

4 participants