embed_log_lambda¶
Resample to a uniform log-λ grid, then embed.
| Category | Embeddings |
| Backend | scipy - implemented here on top of scipy primitives |
| Version | 1.0.1 |
| Reads | ctx.spectrum (a Spectrum1D) |
| Writes | embedding, extras.embedding_provenance, metrics.embedding_dim, metrics.embedding_norm |
The grid spacing is set so the output length is exactly dim. Wavelengths must be strictly positive (the log of a non-positive value is undefined); the algorithm fails fast with a clear error otherwise. Non-finite (NaN/inf) samples are dropped before the resampling — the log-λ interpolation is sampling-independent, so this is safe — and a descending wavelength axis is sorted first.
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
dim |
256 |
- | Output vector length AND number of log-λ samples (positive integer). |
strategy |
'naive' |
- | Recipe applied to the resampled flux: one of ('naive', 'dct', 'multiscale_dct'). |
norm_method |
'min_max' |
- | Pre-embedding flux normalisation: one of ('none', 'min_max', 'z_score', 'continuum'). |
Use it¶
References¶
- Tonry & Davis 1979, AJ, 84, 1511 — radial velocities from cross-correlation in log-λ space.
- Baldry et al. 1999, ApJ, 521, 167 — Doppler invariance of log-wavelength representations.
Related algorithms¶
embed_band_power- Embed a spectrum as the integrated flux in N adjacent wavelength bands.embed_continuum_subtracted- Subtract the polynomial continuum, then embed the line residual.embed_lick_indices- Embed a spectrum as the canonical Lick/IDS line-strength indices.embed_pretrained- Embed a spectrum with a local pre-trained PyTorch model.embed_remote- Embed a spectrum via a remote HTTPS inference endpoint.embed_spectrum- Compute a fixed-length, L2-normalised embedding of a spectrum.embed_wavelets- Embed a spectrum via a truncated discrete wavelet transform.