liger_iris_sim.sources.convolve

Functions

convolve_cube(cube, wave[, psf, resolution, ...])

convolve_point_source(y, x, flux, psf[, ...])

Convolve a point source at [y, x] with a PSF.

convolve_spectrum(wave, spectrum[, ...])

Convolve a spectrum with a Gaussian line spread function (LSF).

get_gaussian_kernel(wave, resolution[, n_res])

liger_iris_sim.sources.convolve.convolve_cube(cube: ndarray, wave: ndarray, psf: ndarray | None = None, resolution: float | None = None, kernel: ndarray | None = None) ndarray[source]
liger_iris_sim.sources.convolve.convolve_point_source(y: float, x: float, flux: float, psf: ndarray, size: tuple[int, int] | None = None, out: ndarray | None = None) ndarray[source]

Convolve a point source at [y, x] with a PSF.

Parameters:
  • y (float) – The y-coordinate of the point source - first axis.

  • x (float) – The x-coordinate of the point source - second axis.

  • flux (float) – The integrated flux of the point source in any units.

  • psf (np.ndarray) – The PSF to convolve with, must already be normalized.

  • size (tuple[int, int]) – The size of the output image.

  • image_out (np.ndarray | None) – An optional output image to write to. If None, a new image is created.

liger_iris_sim.sources.convolve.convolve_spectrum(wave: ndarray, spectrum: ndarray, resolution: float | None = None, kernel: ndarray | None = None) ndarray[source]

Convolve a spectrum with a Gaussian line spread function (LSF).

Parameters:
  • wavelengths (np.ndarray) – The wavelength grid.

  • spectrum (np.ndarray) – The spectrum grid.

  • resolution (float) – The desired resolution, R = lambda / fwhm.

  • n_res (float) – The number of resolution elements (fwhm) to include in the LSF on each side, defaults to 8.

liger_iris_sim.sources.convolve.get_gaussian_kernel(wave, resolution, n_res=8)[source]