How to use the autofit.conf.instance.visualize.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 / plotters / plotter_util.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
import matplotlib.pyplot as plt
import numpy as np

import autoarray as aa
from autolens import exc


def get_subplot_rows_columns_figsize(number_subplots):
    """Get the size of a sub plot in (rows, columns), based on the number of subplots that are going to be plotted.

    Parameters
    -----------
    number_subplots : int
        The number of subplots that are to be plotted in the figure.
    """
github Jammy2211 / PyAutoLens / autolens / plotters / grid_plotters.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
from matplotlib import pyplot as plt
import numpy as np
import itertools

from autolens import exc
from autolens.plotters import plotter_util


def plot_grid(
    grid,
    colors=None,
    axis_limits=None,
    points=None,
    lines=None,
    as_subplot=False,
github Jammy2211 / PyAutoLens / autolens / pipeline / phase / phase_extensions.py View on Github external
model_image_1d: ndarray
                An image produce of the overall system by a model
            galaxy_image_1d: ndarray
                The contribution of one galaxy to the model image
            """

            self.lens_data = lens_data

            self.hyper_model_image_1d = model_image_1d
            self.hyper_galaxy_image_1d = galaxy_image_1d

            self.check_for_previously_masked_values(array=self.hyper_model_image_1d)
            self.check_for_previously_masked_values(array=self.hyper_galaxy_image_1d)

            self.plot_hyper_galaxy_subplot = \
                af.conf.instance.visualize.get('plots', 'plot_hyper_galaxy_subplot',
                                               bool)
github Jammy2211 / PyAutoLens / autolens / plotters / array_plotters.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
import matplotlib.pyplot as plt
import matplotlib.colors as colors

import numpy as np
import itertools

from autolens import exc
from autolens.plotters import plotter_util


def plot_array(
    array,
    origin=None,
    mask=None,
    extract_array_from_mask=False,
github Jammy2211 / PyAutoLens / autolens / data / plotters / data_plotters.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
import numpy as np

from autolens.plotters import array_plotters
from autolens.plotters import grid_plotters
from autolens.plotters import line_yx_plotters


def plot_image(
    image,
    plot_origin=True,
    grid=None,
    mask=None,
    extract_array_from_mask=False,
    zoom_around_mask=False,
    should_plot_border=False,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_fit_plotters.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
from matplotlib import pyplot as plt

import autoarray as aa
from autolens import exc
from autolens.lens.plotters import lens_plotter_util


def plot_fit_subplot(
    fit,
    should_plot_mask=True,
    positions=None,
    units="arcsec",
    kpc_per_arcsec=None,
    figsize=None,
    aspect="square",
github Jammy2211 / PyAutoLens / autolens / model / inversion / plotters / inversion_plotters.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
from matplotlib import pyplot as plt

from autolens.plotters import plotter_util, array_plotters
from autolens.model.inversion.plotters import mapper_plotters
from autolens.model.inversion import mappers


def plot_inversion_subplot(
    inversion,
    mask=None,
    positions=None,
    grid=None,
    extract_array_from_mask=False,
    zoom_around_mask=False,
    units="arcsec",
github Jammy2211 / PyAutoLens / autolens / lens / plotters / sensitivity_fit_plotters.py View on Github external
import autofit as af
import matplotlib

backend = af.conf.instance.visualize.get("figures", "backend", str)
matplotlib.use(backend)
from matplotlib import pyplot as plt

from autolens.plotters import plotter_util
from autolens.lens.plotters import lens_plotter_util


def plot_fit_subplot(
    fit,
    should_plot_mask=True,
    extract_array_from_mask=False,
    zoom_around_mask=False,
    positions=None,
    should_plot_image_plane_pix=True,
    units="arcsec",
    figsize=None,