PetroFit / petrofit

Python package for calculating Petrosian properties and fitting galaxy light profiles
https://petrofit.readthedocs.io
28 stars 7 forks source link

`PSFConvolvedModel2D` and Upgrades to Modeling #100

Closed robelgeda closed 2 years ago

robelgeda commented 2 years ago

Enhancements: close #57 close #55 close #99

Bug fixes: fixes #20 fixes #87 fixes #105 fixes #106

This PR introduces upgrades to and deprecates the PSFModel class by introducing the PSFConvolvedModel2D class (model). This PR also moves the fitting code to a modeling folder according to #99. Deprecation warning has been added to PSFModel but it has not been removed. I will be removed in the next version of the code (likely v0.5, see ticket #102).

For #87, I exposed the Astropy weights parameter in petrofit.modeling.fitting.fit_model so users can pass fitting weights using rms images. I have added this to the docs as well.

robelgeda commented 2 years ago

Reminder to push changes to petrofit_notebooks once this is merged

robelgeda commented 2 years ago

To save time, I have added #20, #87 and #105 to this PR (all related to fitting)

crawfordsm commented 2 years ago

I've taken a look and run through the code. I'm able to reproduce the notebooks, and I like leaving the PSFModel in there for the time being but with the deprecation warning. Setting up the infrastructure to follow the astropy directory structrue make sense and hopefully will make it easier to move some things upstream

robelgeda commented 2 years ago

Thank you @crawfordsm! I will merge once tests pass. Also I did a minor last minute update, I renamed PSFConvolvedImageModel -> PSFConvolvedModel2D because we may in the future make a 1D version of this class. I will open a ticket as a reminder.