How to use the autoarray.plot function in autoarray

To help you get started, we’ve selected a few autoarray 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 / fit_imaging_plotters / fit_imaging_plotters.py View on Github external
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
    )

    positions = lens_plotter_util.get_positions_from_fit(fit=fit, positions=positions)

    critical_curves = lens_plotter_util.get_critical_curves_and_caustics_from_lensing_object(
        obj=fit.tracer,
        include_critical_curves=include_critical_curves,
        include_caustics=False,
    )

    aa.plot.array(
        array=subtracted_image,
        mask=mask,
        grid=image_plane_pix_grid,
        points=positions,
        lines=critical_curves,
        as_subplot=as_subplot,
        unit_label=unit_label,
        unit_conversion_factor=unit_conversion_factor,
        figsize=figsize,
        aspect=aspect,
        cmap=cmap,
        norm=norm,
        norm_min=norm_min,
        norm_max=norm_max,
        linthresh=linthresh,
        linscale=linscale,
github Jammy2211 / PyAutoLens / autolens / plotters / fit_imaging_plotters / fit_imaging_plotters.py View on Github external
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
    )

    positions = lens_plotter_util.get_positions_from_fit(fit=fit, positions=positions)

    plt.subplot(rows, columns, 1)

    aa.plot.fit_imaging.image(
        fit=fit,
        mask=mask,
        grid=image_plane_pix_grid,
        points=positions,
        as_subplot=True,
        unit_label=unit_label,
        unit_conversion_factor=unit_conversion_factor,
        figsize=figsize,
        aspect=aspect,
        cmap=cmap,
        norm=norm,
        norm_min=norm_min,
        norm_max=norm_max,
        linthresh=linthresh,
        linscale=linscale,
        cb_ticksize=cb_ticksize,
github Jammy2211 / PyAutoLens / autolens / plot / hyper_plots.py View on Github external
sub_plotter.setup_subplot(number_subplots=number_subplots, subplot_index=1)

    hyper_galaxy_image(
        galaxy_image=galaxy_image,
        mask=include.mask_from_fit(fit=fit),
        plotter=sub_plotter,
    )

    sub_plotter.setup_subplot(number_subplots=number_subplots, subplot_index=2)

    aa.plot.FitImaging.noise_map(fit=fit, include=include, plotter=sub_plotter)

    sub_plotter.setup_subplot(number_subplots=number_subplots, subplot_index=3)

    aa.plot.FitImaging.noise_map(fit=hyper_fit, include=include, plotter=sub_plotter)

    sub_plotter.setup_subplot(number_subplots=number_subplots, subplot_index=4)

    contribution_map(
        contribution_map_in=contribution_map_in, include=include, plotter=sub_plotter
    )

    sub_plotter.setup_subplot(number_subplots=number_subplots, subplot_index=5)

    aa.plot.FitImaging.chi_squared_map(fit=fit, include=include, plotter=sub_plotter)

    sub_plotter.setup_subplot(number_subplots=number_subplots, subplot_index=6)

    aa.plot.FitImaging.chi_squared_map(
        fit=hyper_fit, include=include, plotter=sub_plotter
    )
github Jammy2211 / PyAutoLens / autolens / plots / phase_plots.py View on Github external
plot_noise_map,
    plot_psf,
    plot_signal_to_noise_map,
    plot_absolute_signal_to_noise_map,
    plot_potential_chi_squared_map,
    visualize_path,
    subplot_path,
):

    output_path = af.path_util.make_and_return_path_from_path_and_folder_names(
        path=visualize_path, folder_names=["imaging"]
    )

    if plot_as_subplot:

        aa.plot.imaging.subplot(
            imaging=imaging,
            mask=mask,
            positions=positions,
            unit_label=unit_label,
            unit_conversion_factor=kpc_per_arcsec,
            output_path=subplot_path,
            format="png",
        )

    aa.plot.imaging.individual(
        imaging=imaging,
        mask=mask,
        positions=positions,
        unit_label=unit_label,
        unit_conversion_factor=kpc_per_arcsec,
        plot_image=plot_image,
github Jammy2211 / PyAutoLens / autolens / pipeline / visualizer.py View on Github external
def visualize_interferometer(self):

        plotter = self.plotter.plotter_with_new_output(
            path=self.plotter.output.path + "interferometer/"
        )

        if self.plot_subplot_dataset:
            aa.plot.Interferometer.subplot_interferometer(
                interferometer=self.masked_dataset.interferometer,
                include=self.include,
                sub_plotter=self.sub_plotter,
            )

        aa.plot.Interferometer.individual(
            interferometer=self.masked_dataset.interferometer,
            plot_visibilities=self.plot_dataset_data,
            plot_u_wavelengths=self.plot_dataset_uv_wavelengths,
            plot_v_wavelengths=self.plot_dataset_uv_wavelengths,
            plot_primary_beam=self.plot_dataset_primary_beam,
            include=self.include,
            plotter=plotter,
        )
github Jammy2211 / PyAutoLens / autolens / plots / phase_plots.py View on Github external
):

    output_path = af.path_util.make_and_return_path_from_path_and_folder_names(
        path=visualize_path, folder_names=["interferometer"]
    )

    if plot_as_subplot:

        aa.plot.interferometer.subplot(
            interferometer=interferometer,
            unit_conversion_factor=kpc_per_arcsec,
            output_path=subplot_path,
            format="png",
        )

    aa.plot.interferometer.individual(
        interferometer=interferometer,
        plot_visibilities=plot_visibilities,
        plot_u_wavelengths=plot_uv_wavelengths,
        plot_v_wavelengths=plot_uv_wavelengths,
        plot_primary_beam=plot_primary_beam,
        unit_label=unit_label,
        unit_conversion_factor=kpc_per_arcsec,
        output_path=output_path,
        format="png",
    )
github Jammy2211 / PyAutoLens / autolens / plot / fit_interferometer_plots / fit_interferometer_plots.py View on Github external
def subplot_fit_interferometer(
    fit,
    include=lensing_plotters.Include(),
    sub_plotter=plotters.SubPlotter(),
):

    aa.plot.fit_interferometer.subplot_fit_interferometer(
        fit=fit,
        include=include,
        sub_plotter=sub_plotter,
    )
github Jammy2211 / PyAutoLens / autolens / pipeline / visualizer.py View on Github external
)

        if self.plot_subplot_dataset:
            aa.plot.Imaging.subplot_imaging(
                imaging=self.masked_imaging.imaging,
                mask=self.include.mask_from_masked_dataset(
                    masked_dataset=self.masked_dataset
                ),
                positions=self.include.positions_from_masked_dataset(
                    masked_dataset=self.masked_dataset
                ),
                include=self.include,
                sub_plotter=self.sub_plotter,
            )

        aa.plot.Imaging.individual(
            imaging=self.masked_imaging.imaging,
            mask=self.include.mask_from_masked_dataset(
                masked_dataset=self.masked_dataset
            ),
            positions=self.include.positions_from_masked_dataset(
                masked_dataset=self.masked_dataset
            ),
            plot_image=self.plot_dataset_data,
            plot_noise_map=self.plot_dataset_noise_map,
            plot_psf=self.plot_dataset_psf,
            plot_inverse_noise_map=self.plot_dataset_inverse_noise_map,
            plot_signal_to_noise_map=self.plot_dataset_signal_to_noise_map,
            plot_absolute_signal_to_noise_map=self.plot_dataset_absolute_signal_to_noise_map,
            plot_potential_chi_squared_map=self.plot_dataset_potential_chi_squared_map,
            include=self.include,
            plotter=plotter,
github Jammy2211 / PyAutoLens / autolens / plotters / fit_imaging_plotters / fit_imaging_plotters.py View on Github external
/ (
                fit.inversion.mapper.grid.scaled_maxima[0]
                - fit.inversion.mapper.grid.scaled_minima[0]
            )
        )

        if aspect is "square":
            aspect_inv = ratio
        elif aspect is "auto":
            aspect_inv = 1.0 / ratio
        elif aspect is "equal":
            aspect_inv = 1.0

        plt.subplot(rows, columns, 4, aspect=float(aspect_inv))

        aa.plot.inversion.reconstruction(
            inversion=fit.inversion,
            lines=caustics,
            include_grid=False,
            include_centres=False,
            as_subplot=True,
            unit_label=unit_label,
            unit_conversion_factor=unit_conversion_factor,
            figsize=figsize,
            aspect=None,
            cmap=cmap,
            norm=norm,
            norm_min=norm_min,
            norm_max=norm_max,
            linthresh=linthresh,
            linscale=linscale,
            cb_ticksize=cb_ticksize,