SpecViz API¶

Analysis Functions¶

Functions¶

 centroid(line, avg_cont[, mask]) Compute centroid for the given spectrum. eq_width(cont1_stats, cont2_stats, line[, mask]) Compute an equivalent width given stats for two continuum regions, and a specutils.core.generic.Spectrum1DRef instance with the extracted spectral line region. extract(data, x_range) Extract a region from a spectrum. fwzi(cont1_stats, cont2_stats, line) Compute full width at zero intensity (FWZI) for the given spectrum. resample(data_in, x_in, x_out, y[, …]) Resample the data of one spectrum using interpolation. stats(data[, mask]) Compute basic statistics for a spectral region contained in a specutils.core.generic.Spectrum1DRef instance.

Classes¶

 BlackBody Produce a blackbody flux spectrum. Spline1D Perform a spline fit

SpecViz core¶

Data Objects

Classes¶

 Spectrum1DRefLayer(data[, wcs, parent, …]) Class to handle layers in SpecViz. Spectrum1DRefModelLayer(data[, model]) A layer for spectrum with a model applied.

Object Dispatch Machinery¶

Object Event Handling

The singleton Dispatch object manages the set of EventNode events. Handlers or listeners are attached to EventNodes. The DispatchHandle decorator is used to decorate classes that handle events.

Classes¶

 Dispatch Central communications object for all events. EventNode(*args) An event

Spectrum Layer Plotting¶

Spectrum Layer Plotting

Classes¶

 LinePlot(layer[, plot, visible, style, pen, …]) Plot representation of a layer

Emission/Absorption Line list utilities¶

Emission/Absorption Line list utilities

Functions¶

 ingest(range) Returns a list with LineList instances.

Classes¶

 LineList([table, name, masked]) A list of emission/absorption lines

Classes¶

 FileLoadThread([parent]) Asynchronously read in a file FitModelThread([parent]) Asynchronously fit a model to a layer

Interfaces¶

Functions¶

 data_loader(label, identifier[, priority, …]) A decorator that registers a function and identifies with an Astropy io registry object.

Model Factories¶

App-wide factories

Classes¶

 Factory Responsible for creation of objects. FitterFactory Create a fitter ModelFactory Create a model

Model Initialization¶

This module is used to initialize spectral models to the data at hand.

This is used by model-fitting code that has to create spectral model instances with sensible parameter values such that they can be used as first guesses by the fitting algorithms.

Functions¶

 initialize(instance, x, y) Initialize given model.

I/O module¶

Functions¶

 apStar_identify(*args, **kwargs) Check whether given filename is FITS. apStar_loader(*args, **kwargs) Loader for APOGEE apStar files. apVisit_identify(*args, **kwargs) Check whether given filename is FITS. apVisit_loader(*args, **kwargs) Loader for APOGEE apVisit files. aspcapStar_identify(*args, **kwargs) Check whether given filename is FITS. aspcapStar_loader(*args, **kwargs) Loader for APOGEE aspcapStar files. cos_identify(*args, **kwargs) Check whether given file contains HST/COS spectral data. cos_spectrum_loader(*args, **kwargs) Load file from COS spectral data into a spectrum object fits_identify(*args, **kwargs) Check whether given filename is FITS. simple_generic_loader(*args, **kwargs) Basic FITS file loader simple_generic_writer(data, file_name, **kwargs) Basic Spectrum1DRef FITS writer. stis_identify(*args, **kwargs) Check whether given file contains HST/STIS spectral data. stis_spectrum_loader(*args, **kwargs) Load file from STIS spectral data into a spectrum object

This module contains functions that perform the actual data parsing.

Classes¶

 AsciiYamlRegister(reference) Defines the generation of Spectrum1DRef objects by parsing ASCII files with information from YAML files. FitsYamlRegister(reference) Defines the generation of Spectrum1DRef objects by parsing FITS files with information from YAML files. LineListYamlRegister(reference) Defines the generation of Spectrum1DRef objects by parsing LineList files with information from YAML files. YamlRegister(reference) Class to encapsulate the IO registry information for a set of yaml-loaded attributes.