Skip to content

Issue linking galaxies as constants through hyper phases #39

@Jammy2211

Description

@Jammy2211

If I link a galaxy prior to a previous phase, using the following code:

            self.galaxies.lens= results.from_phase(
                "phase_3__lens_sersic_sie__source_sersic"
            ).constant.galaxies.lens

There will be a bug when it comes to the hyper combined phase. The lens galaxy will correctly be fitted for in the hyper-galaxy phase, and it will be linked to the hyper combined phase in the sense that its model.info displays correctly in the model.info file, implying the prior was passed. However, its parameters will not be passed to the hyper combined phase that is if the lens galaxy is the only galaxy the hyper combined phase would have a dimensionality of 0.

I can hack a fix to this at the moment but linking galaxies to constants as follows:

            self.galaxies.lens.light = results.from_phase(
                "phase_3__lens_sersic_sie__source_sersic"
            ).constant.galaxies.lens.light

            self.galaxies.lens.mass = results.from_phase(
                "phase_3__lens_sersic_sie__source_sersic"
            ).constant.galaxies.lens.mass

            self.galaxies.lens.shear = results.from_phase(
                "phase_3__lens_sersic_sie__source_sersic"
            ).constant.galaxies.lens.shear

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions