How to use the autoarray.plotter_util.get_critical_curve_and_caustic 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_plotters.py View on Github external
"""Plot the image (e.g. the datas) of a galaxy, on a grid of (y,x) coordinates.

    Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.

    Parameters
    -----------
    galaxy : model.galaxy.galaxy.Galaxy
        The galaxy whose image are plotted.
    grid : ndarray or datas.array.grid_stacks.Grid
        The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
    """
    image = galaxy.profile_image_from_grid(grid=grid)

    if galaxy.has_mass_profile:

        lines = aa.plotter_util.get_critical_curve_and_caustic(
            obj=galaxy,
            grid=grid,
            plot_critical_curve=plot_critical_curves,
            plot_caustics=plot_caustics,
        )
    else:
        lines = None

    aa.plot_array(
        array=image,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
github Jammy2211 / PyAutoLens / autolens / model / profiles / plotters / profile_plotters.py View on Github external
):
    """Plot the x component of the deflection angles of a mass profile, on a grid of (y,x) coordinates.

     Set *autolens.hyper_galaxies.array.plotters.array_plotters* for a description of all innput parameters not described below.

     Parameters
     -----------
     mass_profile : model.profiles.mass_profiles.MassProfile
         The mass profile whose x deflecton angles are plotted.
     grid : ndarray or hyper_galaxies.array.grid_stacks.Grid
         The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
     """
    deflections = mass_profile.deflections_from_grid(grid)
    deflections_x = grid.mask.mapping.scaled_array_2d_from_array_1d(deflections[:, 1])

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=mass_profile,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=deflections_x,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
output_filename="galaxy_convergence",
):
    """Plot the convergence of a galaxy, on a grid of (y,x) coordinates.

    Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.

    Parameters
    -----------
    galaxy : model.galaxy.galaxy.Galaxy
        The galaxy whose convergence is plotted.
    grid : ndarray or datas.array.grid_stacks.Grid
        The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
    """
    convergence = galaxy.convergence_from_grid(grid=grid)

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=galaxy,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=convergence,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
output_filename="galaxy_potential",
):
    """Plot the potential of a galaxy, on a grid of (y,x) coordinates.

     Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.

     Parameters
     -----------
    galaxy : model.galaxy.galaxy.Galaxy
         The galaxy whose potential is plotted.
    grid : ndarray or datas.array.grid_stacks.Grid
         The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
     """
    potential = galaxy.potential_from_grid(grid=grid)

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=galaxy,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=potential,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
):
    """Plot the x component of the deflection angles of a galaxy, on a grid of (y,x) coordinates.

     Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.

     Parameters
     -----------
    galaxy : model.galaxy.galaxy.Galaxy
         The galaxy whose x deflecton angles are plotted.
     grid : ndarray or datas.array.grid_stacks.Grid
         The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
     """
    deflections = galaxy.deflections_from_grid(grid)
    deflections_x = grid.mask.mapping.scaled_array_2d_from_array_1d(deflections[:, 1])

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=galaxy,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=deflections_x,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / profiles / plotters / profile_plotters.py View on Github external
"""Plot the y component of the deflection angles of a mass profile, on a grid of (y,x) coordinates.

    Set *autolens.hyper_galaxies.array.plotters.array_plotters* for a description of all innput parameters not described below.

    Parameters
    -----------
    mass_profile : model.profiles.mass_profiles.MassProfile
        The mass profile whose y deflecton angles are plotted.
    grid : ndarray or hyper_galaxies.array.grid_stacks.Grid
        The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
    """

    deflections = mass_profile.deflections_from_grid(grid)
    deflections_y = grid.mask.mapping.scaled_array_2d_from_array_1d(deflections[:, 0])

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=mass_profile,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=deflections_y,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
):
    """Plot the y component of the deflection angles of a galaxy, on a grid of (y,x) coordinates.

    Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.

    Parameters
    -----------
    galaxy : model.galaxy.galaxy.Galaxy
        The galaxy whose y deflecton angles are plotted.
    grid : ndarray or datas.array.grid_stacks.Grid
        The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
    """
    deflections = galaxy.deflections_from_grid(grid)
    deflections_y = grid.mask.mapping.scaled_array_2d_from_array_1d(deflections[:, 0])

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=galaxy,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=deflections_y,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / galaxy / plotters / galaxy_plotters.py View on Github external
output_filename="galaxy_magnification",
):
    """Plot the magnification of a galaxy, on a grid of (y,x) coordinates.

     Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.

     Parameters
     -----------
    galaxy : model.galaxy.galaxy.Galaxy
         The galaxy whose magnification is plotted.
    grid : ndarray or datas.array.grid_stacks.Grid
         The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
     """
    magnification = galaxy.magnification_from_grid(grid=grid)

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=galaxy,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=magnification,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,
github Jammy2211 / PyAutoLens / autolens / model / profiles / plotters / profile_plotters.py View on Github external
output_filename="magnification",
):
    """Plot the magnification of a mass profile, on a grid of (y,x) coordinates.

    Set *autolens.hyper_galaxies.array.plotters.array_plotters* for a description of all innput parameters not described below.

    Parameters
    -----------
    mass_profile : model.profiles.mass_profiles.MassProfile
        The mass profile whose magnification is plotted.
    grid : ndarray or hyper_galaxies.array.grid_stacks.Grid
        The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2)
    """
    magnification = mass_profile.magnification_from_grid(grid=grid)

    lines = aa.plotter_util.get_critical_curve_and_caustic(
        obj=mass_profile,
        grid=grid,
        plot_critical_curve=plot_critical_curves,
        plot_caustics=plot_caustics,
    )

    aa.plot_array(
        array=magnification,
        mask_overlay=mask,
        positions=positions,
        lines=lines,
        as_subplot=as_subplot,
        units=units,
        kpc_per_arcsec=kpc_per_arcsec,
        figsize=figsize,
        aspect=aspect,