MastAladin#

class mast_aladin.MastAladin(*args: t.Any, **kwargs: t.Any)[source]#

Bases: Aladin, DelayUntilRendered, AIDA

An Aladin-lite widget with enhanced support for datasets from MAST, built on top of ipyaladin.widget.Aladin.

Public constructor

Methods Summary

add_asdf(asdf, **image_options)

Load an ASDF image into the widget.

add_fits(f[, extension])

Load a FITS image into the widget.

add_table(table[, include_names, shape])

Wrapper on the ipyaladin.widget.Aladin.add_table method that enables loading of alternate table types.

get_viewport_region([center])

Return a regions.PolygonSkyRegion representing the perimeter of the MastAladin viewport.

load_table(table[, load_footprints, ...])

Methods Documentation

add_asdf(asdf, **image_options)[source]#

Load an ASDF image into the widget.

Parameters:
add_fits(f, extension=1, **image_options)[source]#

Load a FITS image into the widget.

Parameters:
  • f (Union[str, Path, HDUList]) – The FITS image to load in the widget. It can be given as a path (either a string or a pathlib.Path object), or as an astropy.io.fits.HDUList.

  • extension (int, optional) – FITS extension containing the image data to load. Default is 1.

  • image_options (any) –

    The options for the image. See the Aladin Lite image options

add_table(table, include_names=None, shape='cross', **table_options)[source]#

Wrapper on the ipyaladin.widget.Aladin.add_table method that enables loading of alternate table types. See ipyaladin.widget.Aladin.add_table for more details on the underlying implementation.

Parameters:
  • table (QTable or Table or str) – The table to add. Valid types are astropy table and S3 URIs of parquet files.

  • include_names (list[str]) – List of column names from the remote parquet table to stream into mast-aladin.

  • shape (str | CircleError | EllipseError) – The shape to draw for each source. It accepts the strings “square”, “circle”, “plus”, “cross”, “rhomb”, and “triangle” as well as the two specific classes ipyaladin.CircleError and ipyaladin.EllipseError that adapt the size of the drawn shapes (circles or ellipses) to error columns. See ipyaladin example notebook 04_Importing_Tables.

  • **table_options (dict) – Keyword arguments. The possible values are documented in Aladin Lite's table options

get_viewport_region(center=False)[source]#

Return a regions.PolygonSkyRegion representing the perimeter of the MastAladin viewport.

Parameters:

center (bool, optional) – If False (default), return a region where the vertices are the the outer corners of the corner pixels; otherwise the vertices will be the corner pixel centers.

Returns:

Region with vertices representing the corners of the current field of view in the viewport.

Return type:

regions.PolygonSkyRegion

load_table(table, load_footprints=True, update_viewport=True, unique_column=None)[source]#