Metadata-Version: 2.5
Name: spectro-kernel-recipes
Version: 0.2.0
Summary: Curated measurement recipes (presets) for spectro-kernel: campaign conventions and reduction chains, with references.
Project-URL: Homepage, https://github.com/matthieulel/spectro-kernel-recipes
Project-URL: Documentation, https://docs.spectrokernel.io/recipes/
Project-URL: Kernel, https://github.com/matthieulel/spectro-kernel
Author: spectro-kernel contributors
License: MIT
License-File: LICENSE
Keywords: BeSS,astronomy,presets,recipes,spectro-kernel,spectroscopy
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.11
Requires-Dist: spectro-kernel>=0.7.0
Description-Content-Type: text/markdown

# spectro-kernel-recipes

Curated measurement recipes for [spectro-kernel](https://github.com/matthieulel/spectro-kernel),
the catalogue of literature-cited astronomical spectroscopy algorithms.

A **recipe** is a measurement written down once, reviewed, referenced and
versioned: which bricks, in which order, with which conventions. Everything
that depends on the instrument or the observer is a declared **variable**, and
a **profile** supplies the values at run time. Two observers with two
spectrographs who run the same recipe produce numbers a researcher can
compare, and every result carries the recipe name and version in its history.
The idea is explained at [docs.spectrokernel.io/recipes](https://docs.spectrokernel.io/recipes/).

## Install and use

```bash
pip install spectro-kernel spectro-kernel-recipes
spectro presets                                   # the collection appears as package:spectro-kernel-recipes
spectro preset show be_halpha_ew                  # conventions, references, variables, steps
spectro pipeline be_halpha_ew --input gamma_cas.fits --profile toulouse.yaml   # latitude_deg, longitude_deg
spectro pipeline binary_rv_ccf --input obs.fits --profile my_observatory.yaml
```

From Python:

```python
from spectro_kernel import WorkContext
from spectro_kernel.pipeline import PipelineBuilder

pipeline = PipelineBuilder().from_preset("binary_rv_ccf", profile).build()
result = pipeline.execute(WorkContext(spectrum=spec))
print(result.history[-1])        # pipeline:binary_rv_ccf v1.0.0, the bound variables, the kernel version
```

The kernel discovers the collection through the `spectro_kernel.presets` entry
point; nothing is fetched from the network at run time.

## Recipes

| Recipe | Domain | Status | What it measures |
|---|---|---|---|
| `be_halpha_ew` | Be stars | draft | Barycentric correction from the observer's site, then H-alpha equivalent width (with error) and V/R ratio on a reduced spectrum |
| `binary_rv_ccf` | Binaries, exoplanet hosts | draft | Barycentric radial velocity by cross-correlation against a template |
| `solar_long_slit` | Solar | draft | Raw long-slit frame of the Sun to a normalised, calibrated spectrum (Fraunhofer lines, no lamp) |
| `stellar_long_slit` | Reduction | draft | Raw long-slit stellar frame with an arc lamp to a normalised, calibrated spectrum |
| `be_line_profile_variability` | Be stars | draft | Temporal variance spectrum of H-alpha over a series of normalised epochs (Fullerton, Gies & Bolton 1996) |
| `nova_balmer_decrement` | Novae, symbiotics, H II | draft | c(H-beta), E(B-V) and A_V from the H-alpha / H-beta decrement (Osterbrock & Ferland 2006, CCM89) |
| `star_activity_caii_hk` | Stellar activity | draft | Mount Wilson S index from Ca II H and K, log R'_HK with B-V (Vaughan 1978, Noyes 1984) |
| `star_activity_halpha` | Stellar activity | draft | H-alpha activity index (Gomes da Silva 2011) |
| `star_vsini_fourier` | Kinematics | draft | v sin i from the Fourier first zero of one isolated line (Carroll 1933, Gray 2005) |
| `lamp_resolving_power` | Quality | draft | Resolving power and instrumental FWHM from an arc-lamp spectrum |

`status` tells you how far the review went: `draft` (conventions open for
discussion), `reviewed` (conventions documented and discussed), `reference`
(adopted by the community as the way to make that measurement).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md): copy `TEMPLATE.yaml`, fill it in,
validate it with `spectro preset validate`, open a pull request. The review
discusses the science, not the YAML.

## Licence

MIT, like the kernel.
