Spectrum1DViewer#

class jdaviz.configs.specviz.plugins.viewers.Spectrum1DViewer(*args, **kwargs)[source]#

Bases: JdavizProfileView, WithSliceIndicator

Attributes Summary

Methods Summary

available_linelists()

erase_spectral_lines([name, name_rest, ...])

Erase either all spectral lines, all spectral lines sharing the same name (e.g. 'He II') or a specific name-rest value combination (e.g. 'HE II 1640.5', stored in SpectralLine as 'table_index').

load_line_list(line_table[, replace, ...])

plot_spectral_line(line[, global_redshift, ...])

plot_spectral_lines([line, global_redshift, ...])

Plot either a single spectral line or the set loaded in self.spectral_lines.

set_plot_axes()

Attributes Documentation

redshift#
spectral_lines = None#
tools_nested = [['jdaviz:homezoom_matchx', 'jdaviz:homezoom', 'jdaviz:prevzoom'], ['jdaviz:boxzoom_matchx', 'jdaviz:xrangezoom_matchx', 'jdaviz:boxzoom', 'jdaviz:yrangezoom', 'jdaviz:xrangezoom', 'jdaviz:yrangezoom'], ['jdaviz:panzoom_matchx', 'jdaviz:panzoomx_matchx', 'jdaviz:panzoom_y', 'jdaviz:panzoom', 'jdaviz:panzoom_x', 'jdaviz:panzoom_y'], ['bqplot:xrange'], ['jdaviz:selectslice'], ['jdaviz:viewer_clone', 'jdaviz:sidebar_plot', 'jdaviz:sidebar_export']]#

Methods Documentation

available_linelists()[source]#
erase_spectral_lines(name=None, name_rest=None, show_none=True)[source]#

Erase either all spectral lines, all spectral lines sharing the same name (e.g. ‘He II’) or a specific name-rest value combination (e.g. ‘HE II 1640.5’, stored in SpectralLine as ‘table_index’).

load_line_list(line_table, replace=False, return_table=False, show=True)[source]#
plot_spectral_line(line, global_redshift=None, plot_units=None, **kwargs)[source]#

Deprecated since version 5.2: The plot_spectral_line function is deprecated and may be removed in a future version. Use plot_spectral_lines instead.

plot_spectral_lines(line=None, global_redshift=None, colors=None, plot_units=None, show_all=True, **kwargs)[source]#

Plot either a single spectral line or the set loaded in self.spectral_lines.

If line is provided (a table row, a string index/linename, or a QTable), the function will plot that specific line(s). If line is None, the function behaves like the old plot_spectral_lines and draws all rows.

Examples:
Plot all lines:

plot_spectral_lines()

Plot a single line by name:

plot_spectral_lines(line=’Halpha’) plot_spectral_lines(‘Halpha’)

Plot all lines with custom redshift:

plot_spectral_lines(global_redshift=0.01)

set_plot_axes()[source]#