Closed Jammy2211 closed 1 year ago
Note that both projects are on the following branch for this issue:
https://github.com/Jammy2211/PyAutoGalaxy/tree/feature/linear_light_visuals_fix https://github.com/Jammy2211/PyAutoLens/tree/feature/linear_light_visuals_fix
The following code makes the cardinal sin of editing state of an object:
https://github.com/Jammy2211/PyAutoGalaxy/blob/feature/linear_light_visuals_fix/autogalaxy/abstract_fit.py
This is causing horrible bugs (foturnely, visualization only), downstream in the code.
Could you rewirte the function to not edit state? I am struggling to figure out how to do this myself.
The function effectively takes a
Plane
orTracer
object (which is whatself.model_obj
is) and creates a new one, where allLightProfileLinear
andBasis
objects are mapped such that any linear light profiles become ordinary light profiles.This is required for performing visualization.
You may need to implement the solution separately in the following functions: