Software Documentation

This documentation aims to provide detailed information regarding the use of the QSOtools program. This program was built by Vincent Dumont and is part of the AstroQuasar group’s toolset available here .

Quick and useful calculations

Velocity dispersion between two values

>>> quasar veldisp -w 1215.6701 1215.3394
The velocity dispersion betweeen wavelengths 1215.6701 and 1215.3394 is -81.56394770205024 km/s

Object coordinates

>>> quasar coordinates --ra 00:15:45.2 --dec +22:01:34

     RA  :  00:15:45.200 |   0.2626h |   3.9383d
     DEC : +22:01:33.000 |  22.0261d |  22.0261d

     Distance to dipole (259.5,  -61)      : 138.5192 degrees
     Distance to anti-dipole (439.5,   61) :  41.4808 degrees


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