How to use the autofit.conf.instance.non_linear.get function in autofit

To help you get started, we’ve selected a few autofit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jammy2211 / PyAutoLens / autolens / pipeline / phase / extensions / hyper_phase.py View on Github external
-------
        hyper_phase
            A copy of the original phase with a modified name and path
        """
        phase = copy.deepcopy(self.phase)
        phase.paths.zip()

        phase.optimizer = phase.optimizer.copy_with_name_extension(
            extension=self.hyper_name + "_" + phase.paths.phase_tag,
            remove_phase_tag=True,
        )

        phase.optimizer.const_efficiency_mode = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_const_efficiency_mode", bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_sampling_efficiency", float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_n_live_points", int
        )
        phase.optimizer.multimodal = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_multimodal", bool
        )
        phase.optimizer.evidence_tolerance = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_evidence_tolerance", float
        )
        phase.optimizer.terminate_at_acceptance_ratio = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_terminate_at_acceptance_ratio", bool
        )
        phase.optimizer.acceptance_ratio_threshold = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_acceptance_ratio_threshold", float
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / phase_extensions.py View on Github external
def make_hyper_phase(self):
        phase = super().make_hyper_phase()

        phase.const_efficiency_mode = af.conf.instance.non_linear.get(
            'MultiNest',
            'extension_inversion_const_efficiency_mode',
            bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            'MultiNest',
            'extension_inversion_sampling_efficiency',
            float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            'MultiNest',
            'extension_inversion_n_live_points',
            int
        )

        return phase
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / extensions / hyper_phase.py View on Github external
def make_hyper_phase(self) -> abstract.AbstractPhase:
        """
        Returns
        -------
        hyper_phase
            A copy of the original phase with a modified name and path
        """
        phase = copy.deepcopy(self.phase)
        phase.paths.zip()

        phase.optimizer = phase.optimizer.copy_with_name_extension(
            extension=self.hyper_name + "_" + phase.paths.phase_tag,
            remove_phase_tag=True,
        )

        phase.optimizer.const_efficiency_mode = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_const_efficiency_mode", bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_sampling_efficiency", float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_n_live_points", int
        )
        phase.optimizer.multimodal = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_multimodal", bool
        )
        phase.optimizer.evidence_tolerance = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_evidence_tolerance", float
        )

        phase.is_hyper_phase = True
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / phase_extensions.py View on Github external
def make_hyper_phase(self):
        phase = super().make_hyper_phase()

        phase.const_efficiency_mode = af.conf.instance.non_linear.get(
            'MultiNest',
            'extension_inversion_const_efficiency_mode',
            bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            'MultiNest',
            'extension_inversion_sampling_efficiency',
            float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            'MultiNest',
            'extension_inversion_n_live_points',
            int
        )

        return phase
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / extensions / hyper_phase.py View on Github external
"""
        phase = copy.deepcopy(self.phase)
        phase.paths.zip()

        phase.optimizer = phase.optimizer.copy_with_name_extension(
            extension=self.hyper_name + "_" + phase.paths.phase_tag,
            remove_phase_tag=True,
        )

        phase.optimizer.const_efficiency_mode = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_const_efficiency_mode", bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_sampling_efficiency", float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_n_live_points", int
        )
        phase.optimizer.multimodal = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_multimodal", bool
        )
        phase.optimizer.evidence_tolerance = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_evidence_tolerance", float
        )

        phase.is_hyper_phase = True
        phase.customize_priors = self.customize_priors

        return phase
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / extensions / hyper_phase.py View on Github external
def make_hyper_phase(self) -> abstract.AbstractPhase:
        """
        Returns
        -------
        hyper_phase
            A copy of the original phase with a modified name and path
        """
        phase = copy.deepcopy(self.phase)
        phase.paths.zip()

        phase.optimizer = phase.optimizer.copy_with_name_extension(
            extension=self.hyper_name + "_" + phase.paths.phase_tag,
            remove_phase_tag=True,
        )

        phase.optimizer.const_efficiency_mode = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_const_efficiency_mode", bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_sampling_efficiency", float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_n_live_points", int
        )
        phase.optimizer.multimodal = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_multimodal", bool
        )
        phase.optimizer.evidence_tolerance = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_evidence_tolerance", float
        )
        phase.optimizer.terminate_at_acceptance_ratio = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_terminate_at_acceptance_ratio", bool
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / phase_extensions.py View on Github external
)

            optimizer.phase_tag = ''

            # TODO : This is a HACK :O

            optimizer.variable.lens_galaxies = []
            optimizer.variable.source_galaxies = []
            optimizer.variable.galaxies = []

            phase.const_efficiency_mode = af.conf.instance.non_linear.get(
                'MultiNest',
                'extension_hyper_galaxy_const_efficiency_mode',
                bool
            )
            phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
                'MultiNest',
                'extension_hyper_galaxy_sampling_efficiency',
                float
            )
            phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
                'MultiNest',
                'extension_hyper_galaxy_n_live_points',
                int
            )

            optimizer.variable.hyper_galaxy = g.HyperGalaxy

            if self.include_sky_background:
                optimizer.variable.hyper_image_sky = hd.HyperImageSky

            if self.include_noise_background:
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / extensions / hyper_phase.py View on Github external
remove_phase_tag=True,
        )

        phase.optimizer.const_efficiency_mode = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_const_efficiency_mode", bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_sampling_efficiency", float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_n_live_points", int
        )
        phase.optimizer.multimodal = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_multimodal", bool
        )
        phase.optimizer.evidence_tolerance = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_evidence_tolerance", float
        )

        phase.is_hyper_phase = True
        phase.customize_priors = self.customize_priors

        return phase
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / extensions / hyper_phase.py View on Github external
phase.optimizer = phase.optimizer.copy_with_name_extension(
            extension=self.hyper_name + "_" + phase.paths.phase_tag,
            remove_phase_tag=True,
        )

        phase.optimizer.const_efficiency_mode = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_const_efficiency_mode", bool
        )
        phase.optimizer.sampling_efficiency = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_sampling_efficiency", float
        )
        phase.optimizer.n_live_points = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_n_live_points", int
        )
        phase.optimizer.multimodal = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_multimodal", bool
        )
        phase.optimizer.evidence_tolerance = af.conf.instance.non_linear.get(
            "MultiNest", "extension_combined_evidence_tolerance", float
        )

        phase.is_hyper_phase = True
        phase.customize_priors = self.customize_priors

        return phase