Specviz

class jdaviz.configs.specviz.Specviz(*args, **kwargs)[source] [edit on github]

Bases: jdaviz.core.helpers.ConfigHelper, jdaviz.configs.default.plugins.line_lists.line_list_mixin.LineListMixin

Specviz Helper class.

Methods Summary

autoscale_x()

Sets the x-axis limits to the min/max of the reference data

autoscale_y()

Sets the y-axis limits to the min/max of the reference data

flip_x()

Flips the current limits of the x-axis

flip_y()

Flips the current limits of the y-axis

get_spectra([data_label, apply_slider_redshift])

Returns the current data loaded into the main viewer

get_spectral_regions()

A simple wrapper around the app-level call to retrieve only spectral subsets, which are now returned as SpectralRegions by default.

load_spectrum(data[, data_label, format, ...])

set_redshift(new_redshift)

Apply a redshift to any loaded spectral lines and data.

set_redshift_slider_bounds([lower, upper, step])

Set the upper, lower, or both bounds of the redshift slider.

set_spectrum_tick_format(fmt[, axis])

Manually set the tick format of one of the axes of the profile viewer.

show()

x_limits([x_min, x_max])

Sets the limits of the x-axis

y_limits([y_min, y_max])

Sets the limits of the y-axis

Methods Documentation

autoscale_x()[source] [edit on github]

Sets the x-axis limits to the min/max of the reference data

autoscale_y()[source] [edit on github]

Sets the y-axis limits to the min/max of the reference data

flip_x()[source] [edit on github]

Flips the current limits of the x-axis

flip_y()[source] [edit on github]

Flips the current limits of the y-axis

get_spectra(data_label=None, apply_slider_redshift='Warn')[source] [edit on github]

Returns the current data loaded into the main viewer

get_spectral_regions()[source] [edit on github]

A simple wrapper around the app-level call to retrieve only spectral subsets, which are now returned as SpectralRegions by default.

Returns
spec_regsdict

Mapping from the names of the subsets to the subsets expressed as specutils.SpectralRegion objects.

load_spectrum(data, data_label=None, format=None, show_in_viewer=True)[source] [edit on github]
set_redshift(new_redshift)[source] [edit on github]

Apply a redshift to any loaded spectral lines and data. Also updates the value shown in the slider.

set_redshift_slider_bounds(lower=None, upper=None, step=None)[source] [edit on github]

Set the upper, lower, or both bounds of the redshift slider. Note that this does not do any sanity checks on the numbers provided based on whether the slider is set to Redshift or Radial Velocity.

set_spectrum_tick_format(fmt, axis=None)[source] [edit on github]

Manually set the tick format of one of the axes of the profile viewer.

Parameters
fmtstr

Format of tick marks in the spectrum viewer. For example, '0.1e' to set scientific notation or '0.2f' to turn it off.

axis{0, 1}

The spectrum viewer data axis. Axis 1 corresponds to the Y-axis and 0 to the X-axis.

show()[source] [edit on github]
x_limits(x_min=None, x_max=None)[source] [edit on github]

Sets the limits of the x-axis

Parameters
x_min

The lower bound of the axis. Can also be a Specutils SpectralRegion

x_max

The upper bound of the axis

y_limits(y_min=None, y_max=None)[source] [edit on github]

Sets the limits of the y-axis

Parameters
y_min

The lower bound of the axis. Can also be a Specutils SpectralRegion

y_max

The upper bound of the axis