Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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.
"""
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,
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)
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,
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,
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",
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",
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,