Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cb_pad=0.01,
cb_tick_values=None,
cb_tick_labels=None,
titlesize=10,
xlabelsize=10,
ylabelsize=10,
xyticksize=10,
mask_pointsize=10,
position_pointsize=10,
grid_pointsize=1,
output_path=None,
output_filename="fit_real_space",
output_format="show",
):
rows, columns, figsize_tool = plotter_util.get_subplot_rows_columns_figsize(
number_subplots=2
)
if figsize is None:
figsize = figsize_tool
unit_label, unit_conversion_factor = lens_plotter_util.get_unit_label_and_unit_conversion_factor(
obj=fit.tracer.image_plane, plot_in_kpc=plot_in_kpc
)
image_plane_pix_grid = lens_plotter_util.get_image_plane_pix_grid_from_fit(
include_image_plane_pix=include_image_plane_pix, fit=fit
)
real_space_mask = plotter_util.get_real_space_mask_from_fit(fit=fit, mask=mask)
Parameters
-----------
fit : autolens.lens.fitting.Fitter
Class containing fit between the model datas_ and observed lens datas_ (including residual_map, chi_squared_map etc.)
output_path : str
The path where the datas_ is output if the output_type is a file format (e.g. png, fits)
output_filename : str
The name of the file that is output, if the output_type is a file format (e.g. png, fits)
output_format : str
How the datas_ is output. File formats (e.g. png, fits) output the datas_ to harddisk. 'show' displays the datas_ \
in the python interpreter window.
"""
output_filename += "_" + str(plane_index)
rows, columns, figsize_tool = plotter_util.get_subplot_rows_columns_figsize(
number_subplots=4
)
mask = plotter_util.get_mask_from_fit(fit=fit, mask=mask)
if figsize is None:
figsize = figsize_tool
unit_label, unit_conversion_factor = lens_plotter_util.get_unit_label_and_unit_conversion_factor(
obj=fit.tracer.planes[plane_index], plot_in_kpc=plot_in_kpc
)
plt.figure(figsize=figsize)
image_plane_pix_grid = lens_plotter_util.get_image_plane_pix_grid_from_fit(
include_image_plane_pix=include_image_plane_pix, fit=fit
cb_fraction=0.047,
cb_pad=0.01,
cb_tick_values=None,
cb_tick_labels=None,
titlesize=10,
xlabelsize=10,
ylabelsize=10,
xyticksize=10,
mask_pointsize=10,
position_pointsize=10,
output_path=None,
output_format="show",
output_filename="hyper_galaxies",
):
rows, columns, figsize_tool = plotter_util.get_subplot_rows_columns_figsize(
number_subplots=6
)
if figsize is None:
figsize = figsize_tool
plt.figure(figsize=figsize)
plt.subplot(rows, columns, 1)
hyper_galaxy_image(
hyper_galaxy_image=hyper_galaxy_image_sub,
mask=mask,
as_subplot=True,
unit_label=unit_label,
kpc_per_arcsec=kpc_per_arcsec,
def image_and_source_plane_subplot(
image_plane,
source_plane,
grid,
points=None,
include_critical_curves=False,
include_caustics=False,
axis_limits=None,
plot_in_kpc=False,
output_path=None,
output_format="show",
output_filename="image_and_source_plane_grids",
):
rows, columns, figsize = plotter_util.get_subplot_rows_columns_figsize(
number_subplots=2
)
lines = lens_plotter_util.get_critical_curves_and_caustics_from_lensing_object(
obj=image_plane, include_critical_curves=True, include_caustics=True
)
if include_critical_curves:
critical_curves = [lines[0]]
else:
critical_curves = None
if include_caustics:
caustics = [lines[1]]
else:
caustics = None
cb_fraction=0.047,
cb_pad=0.01,
cb_tick_values=None,
cb_tick_labels=None,
titlesize=10,
xlabelsize=10,
ylabelsize=10,
xyticksize=10,
mask_pointsize=10,
position_pointsize=10,
output_path=None,
output_filename="hyper_galaxy_images",
output_format="show",
):
rows, columns, figsize_tool = plotter_util.get_subplot_rows_columns_figsize(
number_subplots=len(hyper_galaxy_image_path_dict)
)
if not mask:
mask = False
if figsize is None:
figsize = figsize_tool
plt.figure(figsize=figsize)
hyper_index = 0
for path, hyper_galaxy_image_sub in hyper_galaxy_image_path_dict.items():
hyper_index += 1