Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
26 stars 13 forks source link

Remove Plane Object #155

Closed Jammy2211 closed 4 months ago

Jammy2211 commented 4 months ago

This PR set off with the lofty goal of removing the Plane object from PyAutoGalaxy and PyAutoLens.

This was motivated by a belief that the Plane object didn't act as much more than a glorified wrapper of a summation function (e.g. summing together the quantities of individual Galaxy objects).

The refactor started off great, and led to a reduction in code, however as I slowly updated unit tests to make them pass I realised there was a lot of functionality in the Plane object that did specific calculations, oops.

I then ended up adding a Galaxies object, which analogous to a Plane groups galaxies to perform various calculations.

Overall this PR wasn't a huge success and didn't reduce the amount of code as I'd have liked, but it is improvement on what we had before:

So, overall the refactor was worth while, just.