Skip to content

embed_lick_indices

Embed a spectrum as the canonical Lick/IDS line-strength indices.

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, metrics.n_valid_indices

Each index is the equivalent width (or magnitude, for molecular indices) of a feature passband measured against a pseudo-continuum interpolated between two sidebands. The fixed-order vector and the human-readable index names (in extras.embedding_provenance.names) make this the most interpretable embedding the kernel exposes. Non-finite (NaN/inf) samples are dropped before the passband integrals (trapezoidal on the actual wavelengths, hence sampling-independent) and a descending wavelength axis is sorted first.

Parameters

Parameter Default Required Description
l2_normalise False - L2-normalise the output vector. False by default to preserve the physical units (Å / magnitudes). Set True for similarity search.
nan_fill 0.0 - Value to substitute for indices that cannot be measured (passband outside the spectrum's wavelength range).

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("embed_lick_indices", ctx, {
    "l2_normalise": False,
    "nan_fill": 0.0
})
spectro run embed_lick_indices --input spectrum.fits \
  --param l2_normalise=false \
  --param nan_fill=0.0
{
  "tool": "embed_lick_indices",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "l2_normalise": false,
      "nan_fill": 0.0
    }
  }
}

Every algorithm is an MCP tool of the same name; describe_algorithm returns this page's metadata as JSON.

References

  • Worthey et al. 1994, ApJS, 94, 687 — definition of the Lick/IDS index system.
  • Worthey & Ottaviani 1997, ApJS, 111, 377 — revised passband definitions and atmospheric corrections.
  • Trager et al. 1998, ApJS, 116, 1 — extended index list for old stellar populations.