Autostronomy / AstroPhot

A fast, flexible, automated, and differentiable astronomical image 2D forward modelling tool for precise parallel multi-wavelength photometry
https://astrophot.readthedocs.io
GNU General Public License v3.0
79 stars 9 forks source link

U/wmwv/test parameter uncertainty set #131

Closed ConnorStoneAstro closed 8 months ago

ConnorStoneAstro commented 8 months ago

closes #130 fixing the bug which replaces the set_vector_uncertainty method instead of using it to update the uncertainties.

Also the uncertainty is now enforced at the same shape as the value if a shape is available.

codecov[bot] commented 8 months ago

Codecov Report

Merging #131 (44f7c73) into main (a023db7) will increase coverage by 0.15%. The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   77.88%   78.03%   +0.15%     
==========================================
  Files          80       80              
  Lines        6967     6970       +3     
==========================================
+ Hits         5426     5439      +13     
+ Misses       1541     1531      -10     
Files Coverage Δ
astrophot/fit/lm.py 84.02% <100.00%> (+0.51%) :arrow_up:
astrophot/models/model_object.py 80.26% <ø> (ø)
astrophot/param/parameter.py 97.38% <75.00%> (+2.66%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

ConnorStoneAstro commented 8 months ago

Your branch looked good to me so I added a little tweak to prevent a shape mismatch in the value and uncertainty tensors and put it up as a PR. Sorry it's a bit unorthodox to review your own commits. I can cancel the PR so you can submit it if that makes more sense.

ConnorStoneAstro commented 8 months ago

Actually, I think it looks good. I'll just merge it and update the version so the patch is avaialble