Modules

Spectrum module from Barak

The class and functions in this module were built by Neil Crighton and are copies of the ones available in Neil’s Barak package. The documentation below can also be found in the original package’s website .

Spectrum ([dw, dv, wstart, wend, npts, …])

A class to hold information about a spectrum.

find_wa_edges (wa)

Given wavelength bin centres, find the edges of wavelengh bins.

rebin (wav, fl, er, **kwargs)

Rebins spectrum to a new wavelength scale generated using the keyword parameters.

combine (spectra[, cliphi, cliplo, verbose])

Combine spectra pixel by pixel, weighting by the inverse variance of each pixel.

Voigt profile

voigtslow (a, u)

Calculate the voigt function H(a,u).

voigt (a, u)

Compute the Voigt function.

p_voigt (n, b, wave, lambdao, gamma, f)

voigtking (vin, a)

voigt_model (n, b, wave, lambdao, gamma, f)

Zoom effect

Zoom effect functions from Matplotlib

connect_bbox (bbox1, bbox2, loc1a, loc2a, …)

zoom_effect01 (ax1, ax2, xmin, xmax, **kwargs)

ax1 : the main axes ax1 : the zoomed axes (xmin,xmax) : the limits of the colored area in both plot axes.

zoom_effect02 (ax1, ax2, **kwargs)

ax1 : the main axes ax1 : the zoomed axes