hipscat.inspection.visualize_catalog#

Generate a molleview map with the pixel densities of the catalog

NB: Testing validity of generated plots is currently not tested in our unit test suite.

Module Contents#

Functions#

_read_point_map(catalog_base_dir[, storage_options])

Read the object spatial distribution information from a healpix FITS file.

plot_points(catalog[, projection])

Create a visual map of the input points of an in-memory catalog.

plot_pixels(catalog[, projection])

Create a visual map of the pixel density of the catalog.

plot_pixel_list(pixels[, plot_title, projection])

Create a visual map of the pixel density of a list of pixels.

get_projection_method(projection)

Get the healpy plotting method for a specified projection string

_plot_healpix_map(healpix_map, projection, title[, cmap])

Perform the plotting of a healpix pixel map.

_read_point_map(catalog_base_dir, storage_options: Dict[Any, Any] | None = None)[source]#

Read the object spatial distribution information from a healpix FITS file.

Parameters:

catalog_base_dir – path to a catalog

Returns:

one-dimensional numpy array of long integers where the value at each index corresponds to the number of objects found at the healpix pixel.

plot_points(catalog: hipscat.catalog.Catalog, projection='moll', **kwargs)[source]#

Create a visual map of the input points of an in-memory catalog.

Parameters:
  • catalog (hipscat.catalog.Catalog)

  • projection (str) –

    • moll - Molleweide projection (default)

    • gnom - Gnomonic projection

    • cart - Cartesian projection

    • orth - Orthographic projection

plot_pixels(catalog: hipscat.catalog.Catalog, projection='moll', **kwargs)[source]#

Create a visual map of the pixel density of the catalog.

Parameters:
  • catalog (hipscat.catalog.Catalog)

  • projection (str) –

    • moll - Molleweide projection (default)

    • gnom - Gnomonic projection

    • cart - Cartesian projection

    • orth - Orthographic projection

plot_pixel_list(pixels: List[hipscat.pixel_math.HealpixPixel], plot_title: str = '', projection='moll', **kwargs)[source]#

Create a visual map of the pixel density of a list of pixels.

Parameters:
  • pixels – healpix pixels (order and pixel number) to visualize

  • plot_title (str) – heading for the plot

  • projection (str) –

    • moll - Molleweide projection (default)

    • gnom - Gnomonic projection

    • cart - Cartesian projection

    • orth - Orthographic projection

get_projection_method(projection)[source]#

Get the healpy plotting method for a specified projection string

Parameters:

projection (str) – The map projection to use. Valid values include: - moll - Molleweide projection (default) - gnom - Gnomonic projection - cart - Cartesian projection - orth - Orthographic projection

Returns:

The healpy method that plots a HEALPix map with the specified projection

_plot_healpix_map(healpix_map, projection, title, cmap='viridis', **kwargs)[source]#

Perform the plotting of a healpix pixel map.

Parameters:
  • healpix_map – array containing the map

  • projection – projection type to display

  • title – title used in image plot

  • cmap – matplotlib colormap to use