torchsky.log_lambda¶
Stability: core. Names on this page follow the deprecation policy in contributing.
Unit-integral Gaussian convolution on a uniformly spaced ln λ grid.
Guides: spectral-axes
This reference is generated from the package source. Names are grouped by
the module that defines them; import every name from the public
namespace torchsky.log_lambda unless the group text says otherwise.
Top-level namespace¶
Unit-integral Gaussian convolution on a uniformly spaced ln λ grid.
Used for LOSVD broadening and published resolving-power LSFs. The kernel is
normalized to sum to one. sigma → 0 is the identity on the sampled grid
(an honest sub-pixel statement, not a continuous Dirac identity).
convolve_log_lambda ¶
convolve_log_lambda(
flux: Tensor,
dln_lambda: float | Tensor | None = None,
sigma_kms: Tensor | float | None = None,
*,
sigma_px: Tensor | float | None = None,
kernel_radius: int = 8,
mean_kms: Tensor | float = 0.0,
zero_mean: bool = False,
) -> Tensor
Convolve flux with a unit-sum Gaussian in ln λ.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flux
|
Tensor
|
|
required |
dln_lambda
|
float | Tensor | None
|
constant grid spacing |
None
|
sigma_kms
|
Tensor | float | None
|
Gaussian width in km/s, broadcastable to |
None
|
sigma_px
|
Tensor | float | None
|
Gaussian width in grid pixels, broadcastable to |
None
|
kernel_radius
|
int
|
half-width of the discrete kernel in pixels. |
8
|
mean_kms
|
Tensor | float
|
optional kernel mean in km/s (LOSVD streaming), broadcastable
to |
0.0
|
zero_mean
|
bool
|
if True, rebuild the kernel so the discrete first moment
is zero (truncated-Gaussian centering). Incompatible with a
nonzero |
False
|
sigma_R_kms ¶
sigma_R_kms(resolving_power: Tensor | float) -> Tensor
Velocity width of a Gaussian LSF for published resolving power R.
σ = c / (2.355 R) so the FWHM is c / R.