Discover the catalogue¶
You have spectro-kernel installed. The natural next questions are:
"What can I actually do with it?" and "How do I see what each operation does?"
This page answers both. The catalogue is self-describing - you never need to read the source code to know what is available.
"What do I have?" - list the catalogue¶
From the command line:
spectro info # a one-line summary: how many algorithms, categories, presets
spectro list # every algorithm, with its category and one-line description
spectro categories # just the category names
spectro list prints something like:
55 algorithm(s):
barycentric_correction [correction] v1.0.0
Compute the barycentric velocity correction …
detect_lines [line_detection] v1.0.0
Detect emission/absorption peaks and match them …
fit_gaussian_line [line_fitting] v1.1.0
Fit a single Gaussian (plus a linear continuum) …
…
Too long? Filter by category:
"What does this one do?" - describe it¶
spectro describe <name> is the key command. It shows everything about one algorithm,
what it does, what it leans on, the literature behind it, and every parameter:
fit_gaussian_line v1.1.0 [line_fitting]
Fit a single Gaussian (plus a linear continuum) to one spectral line.
Equivalent width follows the convention EW > 0 for absorption …
Backend: scipy
References:
- scipy.optimize.curve_fit - Levenberg-Marquardt / Trust Region Reflective
Parameters:
line_center_angstrom = None (required)
Approximate line centre in Å (required).
window_angstrom = 20.0
Half-width of the fit window on each side of the line (Å).
label = ''
Key under which to store the result; defaults to the rounded centre.
Requires in context: spectrum
Produces: line_fits, metrics.fwhm_angstrom
Read it like this:
- Backend - what the algorithm leans on.
astropy/specutils/astroquerymean a domain-standard implementation is wrapped;scipy/numpymean it is implemented in spectro-kernel itself. (More on this in Why spectro-kernel?.) - References - the literature, so you can check the method.
- Parameters - what you can pass;
(required)ones must be given. - Requires / Produces - what the algorithm reads from and writes to the context.
That last part tells you how to chain algorithms: if one Produces: spectrum and the
next Requires: spectrum, they compose.
The same, from Python¶
from spectro_kernel import list_algorithms, describe_algorithm
# Browse - optionally filtered by category.
for meta in list_algorithms("smoothing"):
print(meta["name"], "-", meta["description"])
# Inspect one in full.
info = describe_algorithm("lomb_scargle")
info["default_params"] # every parameter and its default
info["required_params"] # which ones are mandatory
info["backend"] # 'astropy'
info["references"] # the citations
The same, for an AI agent¶
Over MCP, the discovery tools are list_algorithms and
describe_algorithm - so an agent explores the catalogue exactly the way you just did.
The full reference¶
The Algorithm catalogue page lists every algorithm with its parameters, provenance and references, grouped by category. It is generated directly from the registry, so it is always in sync with the version you have installed.
One catalogue, every door
spectro list, list_algorithms() and the MCP list_algorithms tool all read the
same registry. Whatever you discover through one door is available through the
other two.