How to use the autoarray.plotter_util.get_subplot_rows_columns_figsize 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 / model / galaxy / plotters / galaxy_fit_plotters.py View on Github external
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.0,
    grid_pointsize=1,
    output_path=None,
    output_filename="galaxy_fit",
    output_format="show",
):

    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=4
    )

    mask = lens_plotter_util.get_mask(fit=fit, should_plot_mask=should_plot_mask)

    if figsize is None:
        figsize = figsize_tool

    plt.figure(figsize=figsize)
    plt.subplot(rows, columns, 1)

    plot_galaxy_data_array(
        galaxy_data=fit.galaxy_data,
        mask=mask,
        positions=positions,
        as_subplot=True,
github Jammy2211 / PyAutoLens / autolens / data / plotters / uv_plane_plotters.py View on Github external
Parameters
    -----------
    uv_plane_data : data_type.UVPlaneData
        The uv_plane data_type, which includes the observed data_type, noise_map-map, PSF, signal-to-noise_map-map, etc.
    plot_origin : True
        If true, the origin of the data's coordinate system is plotted as a 'x'.
    image_plane_pix_grid : ndarray or data_type.array.grid_stacks.PixGrid
        If an adaptive pixelization whose pixels are formed by tracing pixels from the data, this plots those pixels \
        over the immage.
    ignore_config : bool
        If *False*, the config file general.ini is used to determine whether the subpot is plotted. If *True*, the \
        config file is ignored.
    """

    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=3
    )

    if figsize is None:
        figsize = figsize_tool

    plt.figure(figsize=figsize)
    plt.subplot(rows, columns, 1)

    plot_visibilities(
        uv_plane_data=uv_plane_data,
        as_subplot=True,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        cmap=cmap,
github Jammy2211 / PyAutoLens / autolens / model / inversion / plotters / inversion_plotters.py View on Github external
linscale=0.01,
    cb_ticksize=10,
    cb_fraction=0.047,
    cb_pad=0.01,
    cb_tick_values=None,
    cb_tick_labels=None,
    titlesize=10,
    xlabelsize=10,
    ylabelsize=10,
    xyticksize=10,
    output_path=None,
    output_format="show",
    output_filename="inversion_subplot",
):

    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=6
    )

    if figsize is None:
        figsize = figsize_tool

    ratio = float(
        (inversion.mapper.arc_second_maxima[1] - inversion.mapper.arc_second_minima[1])
        / (
            inversion.mapper.arc_second_maxima[0]
            - inversion.mapper.arc_second_minima[0]
        )
    )

    if aspect is "square":
        aspect_inv = ratio
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
cb_tick_values=None,
    cb_tick_labels=None,
    titlesize=10,
    xlabelsize=10,
    ylabelsize=10,
    xyticksize=10,
    mask_pointsize=10,
    position_pointsize=10.0,
    grid_pointsize=1,
    output_path=None,
    output_format="show",
    output_filename="galaxy_individual_convergence",
):

    total_mass_profiles = len(galaxy.mass_profiles)
    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=total_mass_profiles
    )

    if figsize is None:
        figsize = figsize_tool

    plt.figure(figsize=figsize)

    for i, mass_profile in enumerate(galaxy.mass_profiles):

        plt.subplot(rows, columns, i + 1)

        profile_plotters.plot_convergence(
            mass_profile=mass_profile,
            grid=grid,
            mask=mask,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
cb_tick_values=None,
    cb_tick_labels=None,
    titlesize=10,
    xlabelsize=10,
    ylabelsize=10,
    xyticksize=10,
    mask_pointsize=10,
    position_pointsize=10.0,
    grid_pointsize=1,
    output_path=None,
    output_format="show",
    output_filename="galaxy_individual_image",
):

    total_light_profiles = len(galaxy.light_profiles)
    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=total_light_profiles
    )

    if figsize is None:
        figsize = figsize_tool

    plt.figure(figsize=figsize)

    for i, light_profile in enumerate(galaxy.light_profiles):

        plt.subplot(rows, columns, i + 1)

        profile_plotters.plot_image(
            light_profile=light_profile,
            mask=mask,
            positions=positions,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
cb_tick_values=None,
    cb_tick_labels=None,
    titlesize=10,
    xlabelsize=10,
    ylabelsize=10,
    xyticksize=10,
    mask_pointsize=10,
    position_pointsize=10.0,
    grid_pointsize=1,
    output_path=None,
    output_format="show",
    output_filename="galaxy_individual_deflections_x",
):

    total_mass_profiles = len(galaxy.mass_profiles)
    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=total_mass_profiles
    )

    if figsize is None:
        figsize = figsize_tool

    plt.figure(figsize=figsize)

    for i, mass_profile in enumerate(galaxy.mass_profiles):

        plt.subplot(rows, columns, i + 1)

        profile_plotters.plot_deflections_x(
            mass_profile=mass_profile,
            grid=grid,
            mask=mask,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
cb_tick_values=None,
    cb_tick_labels=None,
    titlesize=10,
    xlabelsize=10,
    ylabelsize=10,
    xyticksize=10,
    mask_pointsize=10,
    position_pointsize=10.0,
    grid_pointsize=1,
    output_path=None,
    output_format="show",
    output_filename="galaxy_individual_deflections_y",
):

    total_mass_profiles = len(galaxy.mass_profiles)
    rows, columns, figsize_tool = aa.plotter_util.get_subplot_rows_columns_figsize(
        number_subplots=total_mass_profiles
    )

    if figsize is None:
        figsize = figsize_tool

    plt.figure(figsize=figsize)

    for i, mass_profile in enumerate(galaxy.mass_profiles):

        plt.subplot(rows, columns, i + 1)

        profile_plotters.plot_deflections_y(
            mass_profile=mass_profile,
            grid=grid,
            mask=mask,