rubix.telescope.lsf package#
Submodules#
rubix.telescope.lsf.lsf module#
Mainly reimplmented from SimSpin: kateharborne/SimSpin
- rubix.telescope.lsf.lsf.apply_lsf(datacube: Float[Array, 'n1 n2 wave_bins'], lsf_sigma: float, wave_resolution: float, extend_factor: int = 12) Float[Array, 'n1 n2 wave_bins'] [source]#
Apply the Line Spread Function (LSF) to a datacube.
This function first flattens the datacube, applies the LSF to the spectra, and then reshapes the datacube back to the original shape.
- Parameters:
datacube (ndarray) – The input datacube to apply the LSF to.
lsf_sigma (float) – The sigma of the LSF. Currently a Gaussian kernel.
wave_resolution (float) – The wave resolution of the spectra inside the datacube.
extend_factor (int) – The factor to extend the kernel by.
- Returns:
convolved – The convolved datacube.
- Return type:
ndarray
- rubix.telescope.lsf.lsf.apply_lsf_spectra(spectra: Float[Array, 'n_spectra wave_bins'], lsf_sigma: float, wave_resolution: float, extend_factor: int = 12) Float[Array, 'n_spectra wave_bins'] [source]#
Apply the Line Spread Function (LSF) to multiple spectra.
This function applies the LSF to multiple spectra in parallel using JAX’s vmap. Currently only supports a Gaussian kernel and fixed wave resolution across all spectra and wavelenghts.
- Parameters:
spectra (ndarray) – The input spectra to apply the LSF to.
lsf_sigma (float) – The sigma of the LSF. Currently a Gaussian kernel.
wave_resolution (float) – The wave resolution of the spectra.
extend_factor (int) – The factor to extend the kernel by.
- Returns:
convolved – The convolved spectra.
- Return type:
ndarray