rubix.telescope.psf package#
Submodules#
rubix.telescope.psf.kernels module#
- rubix.telescope.psf.kernels.gaussian_kernel_2d(m: int, n: int, sigma: float) Float[Array, 'm n'] [source]#
Create a 2D Gaussian kernel of size m x n with standard deviation sigma.
The kernel is normalized so that the sum of all elements is 1.
- Parameters:
m (int) – The number of rows in the kernel.
n (int) – The number of columns in the kernel.
sigma (float) – The standard deviation of the Gaussian kernel.
- Returns:
The 2D Gaussian kernel of size m x n with standard deviation sigma.
- Return type:
Float[Array, “m n”]
rubix.telescope.psf.psf module#
- rubix.telescope.psf.psf.apply_psf(datacube: Float[Array, 'n_pixel n_pixel wave_bins'], psf_kernel: Float[Array, 'm n']) Float[Array, 'n_pixel n_pixel wave_bins'] [source]#
Apply a point spread function (PSF) to the spectral datacube.
The PSF kernel is convolved with each spectral plane of the datacube to simulate the blurring effect of the telescope.
- Parameters:
datacube (Float[Array, "n_pixel n_pixel wave_bins"]) – The spectral datacube to convolve with the PSF kernel.
psf_kernel (Float[Array, "m n"]) – The 2D PSF kernel to apply to the datacube.
- Returns:
The datacube convolved with the PSF kernel.
- Return type:
Float[Array, “n_pixel n_pixel wave_bins”]
- rubix.telescope.psf.psf.get_psf_kernel(name: str, m: int, n: int, **kwargs) Float[Array, 'm n'] [source]#
Get a point spread function (PSF) kernel. :param name: The name of the PSF kernel to get. :type name: str :param **kwargs: Additional keyword arguments to pass to the PSF kernel function.
- Returns:
The PSF kernel.
- Return type:
Float[Array, “m n”]