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

Update parameter graph to full DAG #121

Closed ConnorStoneAstro closed 9 months ago

ConnorStoneAstro commented 9 months ago

Updated parameter system allows for far more complex parameter graphs with a great deal of interaction and also user defined functions in between parameters. This allows for a number of powerful fitting tasks to be performed. These include:

All tests run except for fitting methods which require significant updates to use the new parameter system.

codecov[bot] commented 9 months ago

Codecov Report

Merging #121 (6db3192) into main (29e418b) will increase coverage by 1.01%. The diff coverage is 92.29%.

@@            Coverage Diff             @@
##             main     #121      +/-   ##
==========================================
+ Coverage   76.81%   77.83%   +1.01%     
==========================================
  Files          78       80       +2     
  Lines        6954     6951       -3     
==========================================
+ Hits         5342     5410      +68     
+ Misses       1612     1541      -71     
Files Coverage Δ
astrophot/__init__.py 20.45% <100.00%> (ø)
astrophot/fit/base.py 73.58% <100.00%> (+1.36%) :arrow_up:
astrophot/fit/gradient.py 80.00% <100.00%> (+0.31%) :arrow_up:
astrophot/fit/hmc.py 82.53% <100.00%> (+0.28%) :arrow_up:
astrophot/fit/lm.py 83.50% <100.00%> (+2.99%) :arrow_up:
astrophot/fit/mhmcmc.py 94.82% <ø> (ø)
astrophot/fit/nuts.py 98.36% <100.00%> (+0.02%) :arrow_up:
astrophot/image/jacobian_image.py 76.05% <100.00%> (ø)
astrophot/image/wcs.py 96.57% <ø> (ø)
astrophot/image/window_object.py 90.30% <100.00%> (ø)
... and 24 more

... and 1 file with indirect coverage changes

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

ConnorStoneAstro commented 9 months ago

Ok, The full system seems to be working! Next I'm going to update the tutorials and add some demos of how to use the new system.

ConnorStoneAstro commented 9 months ago

Everything seems to be online. A new tutorial has been made and added to the AstroPhot-tutorials repo: https://github.com/Autostronomy/AstroPhot-tutorials/tree/params

Looks ready to go!

ConnorStoneAstro commented 9 months ago

Hopefully this will be the last giant 1000+ line update for a while!

ConnorStoneAstro commented 9 months ago

just pushed some updates to docstrings. I'll go through your comments in the morning. Thanks for reviewing so quickly!

ConnorStoneAstro commented 9 months ago

Ok, updated for the comments, going to add more tests next.

ConnorStoneAstro commented 9 months ago

Ok, new tests reach almost every line in the new param DAG stuff! Looks like this is ready to merge.