How to use the autofit.PhaseProperty 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 / phase_galaxy.py View on Github external
return fit_y, fit_x

    def fit_for_instance(self, instance):

        fit_y = fit_galaxy.FitGalaxy(
            masked_galaxy_dataset=self.galaxy_data_y, model_galaxies=instance.galaxies
        )
        fit_x = fit_galaxy.FitGalaxy(
            masked_galaxy_dataset=self.galaxy_data_x, model_galaxies=instance.galaxies
        )

        return fit_y, fit_x


class PhaseGalaxy(abstract.AbstractPhase):
    galaxies = af.PhaseProperty("galaxies")

    Analysis = Analysis

    def __init__(
        self,
        phase_name,
        search,
        folders=tuple(),
        galaxies=None,
        use_image=False,
        use_convergence=False,
        use_potential=False,
        use_deflections=False,
        sub_size=2,
        pixel_scales_interp=None,
        cosmology=cosmo.Planck15,
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / phase_positions.py View on Github external
import numpy as np
from astropy import cosmology as cosmo

import autofit as af
from autolens.lens import ray_tracing, lens_fit
from autolens.pipeline.phase.phase import AbstractPhase, Phase


class PhasePositions(AbstractPhase):
    galaxies = af.PhaseProperty("galaxies")

    @property
    def phase_property_collections(self):
        return [self.galaxies]

    def __init__(
        self,
        phase_name,
        phase_folders=tuple(),
        galaxies=None,
        optimizer_class=af.MultiNest,
        cosmology=cosmo.Planck15,
        auto_link_priors=False,
    ):
        super().__init__(
            phase_name=phase_name,
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / imaging / phase.py View on Github external
from astropy import cosmology as cosmo

import autofit as af
from autolens.pipeline import phase_tagging
from autolens.pipeline.phase import dataset
from autolens.pipeline.phase import extensions
from autolens.pipeline.phase.imaging.analysis import Analysis
from autolens.pipeline.phase.imaging.meta_imaging_fit import MetaImagingFit
from autolens.pipeline.phase.imaging.result import Result


class PhaseImaging(dataset.PhaseDataset):
    galaxies = af.PhaseProperty("galaxies")
    hyper_image_sky = af.PhaseProperty("hyper_image_sky")
    hyper_background_noise = af.PhaseProperty("hyper_background_noise")

    Analysis = Analysis
    Result = Result

    @af.convert_paths
    def __init__(
        self,
        paths,
        *,
        galaxies=None,
        hyper_image_sky=None,
        hyper_background_noise=None,
        optimizer_class=af.MultiNest,
        cosmology=cosmo.Planck15,
        sub_size=2,
        signal_to_noise_limit=None,
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / imaging / phase.py View on Github external
import autogalaxy as ag
from astropy import cosmology as cosmo
from autogalaxy.pipeline.phase import dataset
from autogalaxy.pipeline.phase.imaging.phase import PhaseAttributes as AgPhaseAttributes
from autolens.pipeline.phase.settings import PhaseSettingsImaging
from autolens.pipeline.phase.imaging.analysis import Analysis
from autolens.pipeline.phase.imaging.meta_imaging import MetaImaging
from autolens.pipeline.phase.imaging.result import Result
from autolens.pipeline.phase.extensions.stochastic_phase import StochasticPhase


class PhaseImaging(dataset.PhaseDataset):

    galaxies = af.PhaseProperty("galaxies")
    hyper_image_sky = af.PhaseProperty("hyper_image_sky")
    hyper_background_noise = af.PhaseProperty("hyper_background_noise")

    Analysis = Analysis
    Result = Result

    @af.convert_paths
    def __init__(
        self,
        paths,
        *,
        search,
        galaxies=None,
        hyper_image_sky=None,
        hyper_background_noise=None,
        settings=PhaseSettingsImaging(),
        cosmology=cosmo.Planck15,
    ):
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / dataset / phase.py View on Github external
from astropy import cosmology as cosmo

import autofit as af
from autofit.tools.phase import Dataset
from autolens.pipeline.phase import abstract
from autolens.pipeline.phase import extensions
from autolens.pipeline.phase.dataset.result import Result


class PhaseDataset(abstract.AbstractPhase):
    galaxies = af.PhaseProperty("galaxies")

    Result = Result

    @af.convert_paths
    def __init__(
        self,
        paths,
        galaxies=None,
        non_linear_class=af.MultiNest,
        cosmology=cosmo.Planck15,
    ):
        """

        A phase in an lens pipeline. Uses the set non_linear optimizer to try to fit models and hyper_galaxies
        passed to it.
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / interferometer / phase.py View on Github external
from autoarray.operators import transformer
from autogalaxy.pipeline.phase import dataset
from autogalaxy.pipeline.phase.interferometer.phase import (
    PhaseAttributes as AgPhaseAttributes,
)
from autolens.pipeline.phase.settings import PhaseSettingsInterferometer
from autolens.pipeline.phase.interferometer.analysis import Analysis
from autolens.pipeline.phase.interferometer.meta_interferometer import (
    MetaInterferometer,
)
from autolens.pipeline.phase.interferometer.result import Result


class PhaseInterferometer(dataset.PhaseDataset):
    galaxies = af.PhaseProperty("galaxies")
    hyper_background_noise = af.PhaseProperty("hyper_background_noise")

    Analysis = Analysis
    Result = Result

    @af.convert_paths
    def __init__(
        self,
        paths,
        *,
        search,
        real_space_mask,
        galaxies=None,
        hyper_background_noise=None,
        settings=PhaseSettingsInterferometer(),
        cosmology=cosmo.Planck15,
    ):
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / imaging / phase.py View on Github external
import autofit as af
import autogalaxy as ag
from astropy import cosmology as cosmo
from autogalaxy.pipeline.phase import dataset
from autogalaxy.pipeline.phase.imaging.phase import PhaseAttributes as AgPhaseAttributes
from autolens.pipeline.phase.settings import PhaseSettingsImaging
from autolens.pipeline.phase.imaging.analysis import Analysis
from autolens.pipeline.phase.imaging.meta_imaging import MetaImaging
from autolens.pipeline.phase.imaging.result import Result
from autolens.pipeline.phase.extensions.stochastic_phase import StochasticPhase


class PhaseImaging(dataset.PhaseDataset):

    galaxies = af.PhaseProperty("galaxies")
    hyper_image_sky = af.PhaseProperty("hyper_image_sky")
    hyper_background_noise = af.PhaseProperty("hyper_background_noise")

    Analysis = Analysis
    Result = Result

    @af.convert_paths
    def __init__(
        self,
        paths,
        *,
        search,
        galaxies=None,
        hyper_image_sky=None,
        hyper_background_noise=None,
        settings=PhaseSettingsImaging(),
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / imaging / phase.py View on Github external
from astropy import cosmology as cosmo

import autofit as af
from autolens.pipeline import phase_tagging
from autolens.pipeline.phase import dataset
from autolens.pipeline.phase import extensions
from autolens.pipeline.phase.imaging.analysis import Analysis
from autolens.pipeline.phase.imaging.meta_imaging_fit import MetaImagingFit
from autolens.pipeline.phase.imaging.result import Result


class PhaseImaging(dataset.PhaseDataset):
    galaxies = af.PhaseProperty("galaxies")
    hyper_image_sky = af.PhaseProperty("hyper_image_sky")
    hyper_background_noise = af.PhaseProperty("hyper_background_noise")

    Analysis = Analysis
    Result = Result

    @af.convert_paths
    def __init__(
        self,
        paths,
        *,
        galaxies=None,
        hyper_image_sky=None,
        hyper_background_noise=None,
        optimizer_class=af.MultiNest,
        cosmology=cosmo.Planck15,
        sub_size=2,