ViewportOutline#

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

Bases: HasTraits

Draw the outline of a mast-aladin viewport’s coordinate limits in jdaviz, and vice versa.

On initialization, clears any existing viewport outlines in the viewers, before creating new ones.

Traitlets#

outline_colorstr

Hex color code for the outline overlay, default is red.

outline_widthstr

Width of the outline overlay, default is 4.

jdaviz_outline_in_aladinbool

Draw the outline of the jdaviz viewport in mast-aladin. Default is True.

aladin_outline_in_jdavizbool

Draw the outline of the mast-aladin viewport in jdaviz. Default is True.

param jdaviz_viewer:

Instance of a jdaviz viewer. Can be retrieved from jdaviz_app.viewers dict (e.g., app.viewers['imviz-0']).

type jdaviz_viewer:

jdaviz.configs.imviz.plugins.viewers.ImvizImageView

param aladin:

Instance of a Mast Aladin app.

type aladin:

MastAladin

param jdaviz_outline_in_aladin:

Draw the outline of the jdaviz viewport in mast-aladin. Default is True.

type jdaviz_outline_in_aladin:

bool

param aladin_outline_in_jdaviz:

Draw the outline of the mast-aladin viewport in jdaviz. Default is True.

type aladin_outline_in_jdaviz:

bool

Attributes Summary

aladin_outline_in_jdaviz

A boolean (True, False) trait.

aladin_overlay

jdaviz_outline_in_aladin

A boolean (True, False) trait.

jdaviz_overlay

outline_color

A trait for unicode strings.

outline_width

A float trait.

Methods Summary

clear_all()

Clear all outlines, including those that were created by another instance of ViewportOutline.

for_current_apps([jdaviz_viewer_name])

Construct a ViewportOutline for the latest instantiated instances of mast_aladin.MastAladin and ImvizImageView.

Attributes Documentation

aladin_outline_in_jdaviz#

A boolean (True, False) trait.

aladin_overlay = None#
jdaviz_outline_in_aladin#

A boolean (True, False) trait.

jdaviz_overlay = None#
outline_color#

A trait for unicode strings.

outline_width#

A float trait.

Methods Documentation

clear_all()[source]#

Clear all outlines, including those that were created by another instance of ViewportOutline.

classmethod for_current_apps(jdaviz_viewer_name=None)[source]#

Construct a ViewportOutline for the latest instantiated instances of mast_aladin.MastAladin and ImvizImageView.

Parameters:

jdaviz_viewer_name (str or None) – Name for one viewer in jdaviz. If None, uses the first available viewer.