logspace_dispersion

paintbox.logspace_dispersion(interval, velscale, vunit=None)[source] [edit on github]

Returns a wavelength dispersion array with constant velocity scale .

This code is an adaptation of pPXF’s log_rebin routine, simplified to deal with the wavelength dispersion only, and dealing with arbitrary units using astropy.

Parameters
interval: list, np.array or astropy.Quantity

Input wavelength dispersion range with two elements.

velscale: float or astropy.Quantity

Desired output velocity scale. Units are assumed to be km/s unless specified as an astropy.Quantity.

vunit: astroppy.Quantity

Units of the velocity scale. Defaults to km/s.

Returns
np.array

Wavelength array in interval [w1, w2),