broaden

breads.utils.broaden(wvs, spectrum, R, mppool=None, kernel=None)[source]

Broaden a spectrum to instrument resolution assuming a gaussian line spread function.

Args:

wvs: Wavelength vector (ndarray). spectrum: Spectrum vector (ndarray). R: Resolution of the instrument as lambda/(delta lambda) with delta lambda the FWHM of the line spread function.

If scalar, the resolution is assumed to be independent of wavelength. Or the resolution can be specified at each wavelength if R is a vector of the same size as wvs.

mypool: Multiprocessing pool to parallelize the code. If None (default), non parallelization is applied.

E.g. mppool = mp.Pool(processes=10) # 10 is the number processes

Returns

Broadened spectrum