In AutoLens, we have a pass_priors function as follows:
class LensSourcePhase(phase.LensSourcePlanePhase):
def pass_priors(self,previous_results):
phase_1_results=previous_results[0]
self.source_galaxies.source = phase_1_results.variable.source
The source GalaxyModel comes in with the correct lower / upper limits (e.g. 0.0 -> inf), but when it is over-written by the phase_1_results source, the limits automatically reset to -inf -> inf.
This means that certain parameters for certain models are going to unphysical values (e.g. negative intensity, effective radius, etc.). When we use a '.variable' to link two parameters, we should always default to the config lower / upper limits, or, at the very least, use the same values as the previous phase.
In AutoLens, we have a pass_priors function as follows:
The source GalaxyModel comes in with the correct lower / upper limits (e.g. 0.0 -> inf), but when it is over-written by the phase_1_results source, the limits automatically reset to -inf -> inf.
This means that certain parameters for certain models are going to unphysical values (e.g. negative intensity, effective radius, etc.). When we use a '.variable' to link two parameters, we should always default to the config lower / upper limits, or, at the very least, use the same values as the previous phase.