Skip to content

jason-neal/convolve_spectrum

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages