Skip to content

embed_quick

Normalise the continuum and embed the spectrum into a 256-d searchable vector. Drop this pipeline on any single spectrum to get a ready-to-index embedding with its provenance recorded on the context.

Kind analysis
Status reference - reviewed and adopted as the reference way to make this measurement
Version 1.0.0
Source bundled

Variables

This recipe declares no variables: it runs as is.

Steps

# Algorithm Parameters
1 normalize_polynomial Normalise continuum order=3
2 embed_spectrum Embed (DCT truncation) dim=256, strategy='dct', norm_method='none'

Run it

spectro pipeline embed_quick --input spectrum.fits
spectro preset show embed_quick      # variables and steps
from spectro_kernel import WorkContext
from spectro_kernel.pipeline import PipelineBuilder

pipeline = PipelineBuilder().from_preset("embed_quick").build()
result = pipeline.execute(ctx)        # ctx holds the spectrum / frames
print(result.history[-1])             # pipeline:<name> vX.Y.Z + variables
{
  "tool": "run_preset",
  "arguments": {
    "session_id": "<session_id>",
    "preset_name": "embed_quick"
  }
}