How to use the autoarray.plot.plotters 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 / plot / hyper_plots.py View on Github external
@plotters.set_subplot_filename
def subplot_fit_hyper_galaxy(
    fit, hyper_fit, galaxy_image, contribution_map_in, include=None, sub_plotter=None
):

    number_subplots = 6

    sub_plotter.open_subplot_figure(number_subplots=number_subplots)

    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,
    )
github Jammy2211 / PyAutoLens / autolens / plot / inversion_plots.py View on Github external
@plotters.set_labels
def interpolated_errors(
    inversion,
    source_positions=None,
    grid=None,
    caustics=None,
    include=None,
    plotter=None,
):

    plotter.plot_array(
        array=inversion.interpolated_errors_from_shape_2d(),
        positions=source_positions,
        grid=grid,
        critical_curves=caustics,
        include_origin=include.origin,
        include_border=include.border,
github Jammy2211 / PyAutoLens / autolens / plot / fit_interferometer_plots / fit_interferometer_plots.py View on Github external
@plotters.set_subplot_filename
def subplot_fit_real_space(
    fit,
    include=lensing_plotters.Include(),
    sub_plotter=plotters.SubPlotter(),
):

    number_subplots = 2

    sub_plotter.open_subplot_figure(number_subplots=number_subplots)

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

    if fit.inversion is None:

        ray_tracing_plots.profile_image(
            tracer=fit.tracer,
github Jammy2211 / PyAutoLens / autolens / plot / ray_tracing_plots.py View on Github external
@plotters.set_labels
def potential(tracer, grid, include=None, plotter=None):

    plotter.plot_array(
        array=tracer.potential_from_grid(grid=grid),
        mask=include.mask_from_grid(grid=grid),
        critical_curves=include.critical_curves_from_obj(obj=tracer),
        light_profile_centres=include.light_profile_centres_from_obj(obj=tracer),
        mass_profile_centres=include.mass_profile_centres_from_obj(obj=tracer),
        include_origin=include.origin,
    )
github Jammy2211 / PyAutoLens / autolens / plot / inversion_plots.py View on Github external
@plotters.set_labels
def residual_map(
    inversion,
    source_positions=None,
    caustics=None,
    image_pixel_indexes=None,
    source_pixel_indexes=None,
    include=None,
    plotter=None,
):

    source_pixel_values = inversion.mapper.reconstructed_pixelization_from_solution_vector(
        solution_vector=inversion.residual_map
    )

    plotter.plot_mapper(
        mapper=inversion.mapper,
github Jammy2211 / PyAutoLens / autolens / plot / inversion_plots.py View on Github external
@plotters.set_subplot_filename
def subplot_inversion(
    inversion,
    image_positions=None,
    source_positions=None,
    grid=None,
    light_profile_centres=None,
    mass_profile_centres=None,
    critical_curves=None,
    caustics=None,
    image_pixel_indexes=None,
    source_pixel_indexes=None,
    include=None,
    sub_plotter=None,
):

    number_subplots = 6
github Jammy2211 / PyAutoLens / autolens / plot / ray_tracing_plots.py View on Github external
@plotters.set_subplot_filename
def subplot_tracer(tracer, grid, positions=None, include=None, sub_plotter=None):
    """Plot the observed _tracer of an analysis, using the *Imaging* class object.

    The visualization and output type can be fully customized.

    Parameters
    -----------
    tracer : autolens.imaging.tracer.Imaging
        Class containing the _tracer,  noise_mappers and PSF that are to be plotted.
        The font size of the figure ylabel.
    output_path : str
        The path where the _tracer is output if the output_type is a file format (e.g. png, fits)
    output_format : str
        How the _tracer is output. File formats (e.g. png, fits) output the _tracer to harddisk. 'show' displays the _tracer \
        in the python interpreter window.
    """
github Jammy2211 / PyAutoLens / autolens / plot / fit_imaging_plots.py View on Github external
@plotters.set_labels
def model_image_of_plane(fit, plane_index, include=None, plotter=None):
    """Plot the model image of a specific plane of a lens fit.

    Set *autolens.datas.arrays.plotters.plotters* for a description of all input parameters not described below.

    Parameters
    -----------
    fit : datas.fitting.fitting.AbstractFitter
        The fit to the datas, which includes a list of every model image, residual_map, chi-squareds, etc.
    plane_indexes : [int]
        The plane from which the model image is generated.
    """

    if isinstance(plotter, lensing_plotters.Plotter):
        plotter = plotter.plotter_with_new_output(
            filename=plotter.output.filename + "_" + str(plane_index)
github Jammy2211 / PyAutoLens / autolens / plot / mapper_plots.py View on Github external
@plotters.set_labels
def subplot_image_and_mapper(
    image,
    mapper,
    image_positions=None,
    source_positions=None,
    critical_curves=None,
    caustics=None,
    image_pixel_indexes=None,
    source_pixel_indexes=None,
    include=plotters.Include(),
    sub_plotter=None,
):

    number_subplots = 2

    sub_plotter.open_subplot_figure(number_subplots=number_subplots)
github Jammy2211 / PyAutoLens / autolens / plot / fit_imaging_plots.py View on Github external
@plotters.set_subplot_filename
def subplot_of_plane(fit, plane_index, include=None, sub_plotter=None):
    """Plot the model datas_ of an analysis, using the *Fitter* class object.

    The visualization and output type can be fully customized.

    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.