jason-neal / convolve_spectrum

Gaussian convolution with uneven wavelength grid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spectrum Convolution

Build StatusCodacy BadgeCoverage Status

  • Convolve a spectrum by a Gaussian instrument profile with a given Resolution R.
  • Does not need a equidistant wavelength steps.
  • Uses multiprocessing to speed up the convolution.
  • Calculates the IP for every pixel/wavelength individually (but this is embarrassingly parallel).

Installation

    git clone https://github.com/jason-neal/convolve_spectrum.git   
    cd convolve_spectrum
    pip install -r requirements/requirements.txt
    python setup.py install

Usage

    from convolve_spectrum import ipconvolution
    convolved_wav, convolved_flux = ip_convolution(wav, flux, wav_limits, R, fwhm_lim=5.0) 

The wavelength axis is reduced to wav_limits due to edge effects in the convolution.

Notes

The original version of this code was used for the IP component of Figueira et. al. 2016 and explained in detail there (page 3).

About

Gaussian convolution with uneven wavelength grid.

License:MIT License


Languages

Language:Python 100.0%