embed_band_power¶
Embed a spectrum as the integrated flux in N adjacent wavelength bands.
| Category | Embeddings |
| Backend | numpy - implemented here on top of numpy primitives |
| Version | 2.0.1 |
| Reads | ctx.spectrum (a Spectrum1D) |
| Writes | embedding, extras.embedding_provenance, metrics.embedding_dim, metrics.embedding_norm |
Equivalent to converting a spectrum into a 'virtual photometric catalogue' with N synthetic broad bands. Very cheap and well-suited to indexing very heterogeneous datasets (different dispersions, resolutions, telescopes). Non-finite (NaN/inf) samples are dropped before integration — the trapezoidal band integral uses the actual wavelengths, so this is sampling-independent — and a descending wavelength axis is sorted first (band edges are taken from the finite samples).
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
n_bands |
16 |
- | Number of bands; also the output dim. Typically 8–32. |
spacing |
'log' |
- | Band edges in wavelength: 'linear' or 'log'. |
log_flux |
True |
- | Take log10(integrated_flux + epsilon) before L2 norm. |
epsilon |
1e-12 |
- | Small floor added before log_flux to keep zero bands finite. |
Use it¶
References¶
- Connolly et al. 1995, AJ, 110, 1071 — photometric SED classification.
- Bolzonella et al. 2000, A&A, 363, 476 — band-power feature vectors for spectro-photometric classification.
Related algorithms¶
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_log_lambda- Resample to a uniform log-λ grid, then embed.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.