{
  "schema_version": "1",
  "spectrokernel_version": "0.8.1",
  "site_url": "https://docs.spectrokernel.io/",
  "count": 17,
  "recipes": [
    {
      "name": "balmer_quick",
      "description": "Quick analysis of the Balmer lines (H-alpha, H-beta, H-gamma) on an already-loaded spectrum: normalise the continuum, estimate SNR, then fit a Gaussian to each line.",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "reference",
      "requires": null,
      "references": [],
      "conventions": "",
      "source": "bundled",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "normalize_polynomial",
          "name": "Normalise continuum",
          "params": {
            "order": 3,
            "sigma_clip": 3.0
          }
        },
        {
          "algorithm": "snr_der",
          "name": "Compute SNR",
          "params": {}
        },
        {
          "algorithm": "fit_gaussian_line",
          "name": "Fit H-alpha",
          "params": {
            "line_center_angstrom": 6562.79,
            "window_angstrom": 30.0,
            "label": "H-alpha"
          }
        },
        {
          "algorithm": "fit_gaussian_line",
          "name": "Fit H-beta",
          "params": {
            "line_center_angstrom": 4861.35,
            "window_angstrom": 30.0,
            "label": "H-beta"
          }
        },
        {
          "algorithm": "fit_gaussian_line",
          "name": "Fit H-gamma",
          "params": {
            "line_center_angstrom": 4340.47,
            "window_angstrom": 25.0,
            "label": "H-gamma"
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/balmer_quick/"
    },
    {
      "name": "be_halpha_ew",
      "description": "H-alpha equivalent width and V/R ratio of a Be star on a reduced, wavelength- calibrated spectrum: the wavelengths are brought to the barycentric frame from the header and the observer's site, the continuum is set on a line-free band on the blue side of the line, the equivalent width is integrated over a fixed window with the Vollmann & Eversberg (2006) error, and the V/R ratio of a double-peaked profile is measured. Every observer who runs this recipe measures the same quantity the same way, whatever the instrument; only the site coordinates come from the observer's profile.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Vollmann & Eversberg 2006, Astronomische Nachrichten 327, 862 - equivalent width and its error",
        "Neiner et al. 2011, AJ 142, 149 - the BeSS database of Be star spectra",
        "Hanuschik et al. 1996, A&AS 116, 309 - atlas of H-alpha emission and shell profiles in Be stars"
      ],
      "conventions": "Barycentric correction applied before any measurement (BeSS stores spectra in the heliocentric frame, BSS_VHEL). Continuum fixed on 6500-6520 Angstrom (blue side, free of strong lines at the resolutions of amateur spectrographs). Equivalent width integrated over 60 Angstrom centred on 6562.79 Angstrom (rest, air), wide enough to enclose the wings of broad Be emission; negative EW = emission. V/R measured within +/- 15 Angstrom of the line centre. These bands are this recipe's choice, not prescribed by the literature: discuss them before promoting the recipe.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 3,
      "variables": [
        {
          "name": "latitude_deg",
          "type": "float",
          "required": true,
          "description": "observatory latitude (deg, north positive)"
        },
        {
          "name": "longitude_deg",
          "type": "float",
          "required": true,
          "description": "observatory longitude (deg, east positive)"
        },
        {
          "name": "elevation_m",
          "type": "float",
          "required": false,
          "description": "observatory elevation (m)",
          "default": 0.0
        }
      ],
      "steps": [
        {
          "algorithm": "barycentric_correction",
          "name": "Barycentric correction from the header and the site",
          "params": {
            "latitude_deg": "${latitude_deg}",
            "longitude_deg": "${longitude_deg}",
            "elevation_m": "${elevation_m}"
          }
        },
        {
          "algorithm": "normalize_to_region",
          "name": "Continuum to unity on the blue band",
          "params": {
            "wave_lo": 6500.0,
            "wave_hi": 6520.0
          }
        },
        {
          "algorithm": "snr_der",
          "name": "Signal-to-noise (DER_SNR)",
          "params": {}
        },
        {
          "algorithm": "equivalent_width",
          "name": "H-alpha equivalent width",
          "params": {
            "line_center_angstrom": 6562.79,
            "window_angstrom": 60.0,
            "label": "H-alpha"
          }
        },
        {
          "algorithm": "vr_ratio",
          "name": "V/R ratio of the H-alpha profile",
          "params": {
            "line_center_aa": 6562.79,
            "window_half_width_aa": 15.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/be_halpha_ew/"
    },
    {
      "name": "be_line_profile_variability",
      "description": "Temporal variance spectrum of the H-alpha profile of a Be star over a series of epochs (Fullerton, Gies & Bolton 1996): where, in velocity, the line profile varies significantly from night to night, and how strongly. Runs on a set of continuum-normalised spectra, typically the epochs of a multi-observer campaign already brought to the same normalisation by be_halpha_ew.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Fullerton, Gies & Bolton 1996, ApJS 103, 475 - the temporal variance spectrum and its chi-squared significance test",
        "Hanuschik et al. 1996, A&AS 116, 309 - H-alpha emission and shell profiles of Be stars"
      ],
      "conventions": "Noise of each epoch estimated on the continuum band 6500-6520 Angstrom (the same band be_halpha_ew normalises on) unless the spectra carry uncertainties; significance at the 99 percent level; a variable range is reported only for runs of at least three contiguous significant pixels.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "temporal_variance_spectrum",
          "name": "Temporal variance spectrum of H-alpha",
          "params": {
            "continuum_lo": 6500.0,
            "continuum_hi": 6520.0,
            "confidence": 0.99,
            "min_run_pixels": 3
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/be_line_profile_variability/"
    },
    {
      "name": "binary_rv_ccf",
      "description": "Radial velocity of a star by cross-correlation against a template, for the follow-up of spectroscopic binaries and exoplanet hosts: barycentric correction from the header, continuum normalisation, then the Tonry & Davis cross-correlation on a log-wavelength grid sampled at the native resolution.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Tonry & Davis 1979, AJ 84, 1511 - cross-correlation radial velocities and their error",
        "Kurtz & Mink 1998, PASP 110, 934 - RVSAO, the practical cross-correlation implementation",
        "Bouchy, Pepe & Queloz 2001, A&A 374, 733 - photon-noise limit of the radial velocity"
      ],
      "conventions": "Continuum removed with a 3rd-order polynomial and 3-sigma clipping before the correlation; the log-wavelength grid follows the finest native sampling (n_grid unset) so the velocity step is not the limiting factor; search range +/- 400 km/s. The template is the observer's choice (a synthetic spectrum or a high signal-to-noise observation of a standard) and is therefore a variable.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 4,
      "variables": [
        {
          "name": "template_path",
          "type": "path",
          "required": true,
          "description": "template spectrum (FITS or ASCII) at rest velocity"
        },
        {
          "name": "latitude_deg",
          "type": "float",
          "required": true,
          "description": "observatory latitude (deg)"
        },
        {
          "name": "longitude_deg",
          "type": "float",
          "required": true,
          "description": "observatory longitude (deg, east positive)"
        },
        {
          "name": "elevation_m",
          "type": "float",
          "required": false,
          "description": "observatory elevation (m)",
          "default": 0.0
        }
      ],
      "steps": [
        {
          "algorithm": "barycentric_correction",
          "name": "Barycentric correction from the header",
          "params": {
            "latitude_deg": "${latitude_deg}",
            "longitude_deg": "${longitude_deg}",
            "elevation_m": "${elevation_m}"
          }
        },
        {
          "algorithm": "normalize_polynomial",
          "name": "Continuum normalisation",
          "params": {
            "order": 3,
            "sigma_clip": 3.0
          }
        },
        {
          "algorithm": "cross_correlate_rv",
          "name": "Cross-correlation radial velocity",
          "params": {
            "template_path": "${template_path}",
            "n_grid": null,
            "vmin_kms": -400.0,
            "vmax_kms": 400.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/binary_rv_ccf/"
    },
    {
      "name": "embed_quick",
      "description": "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.",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "reference",
      "requires": null,
      "references": [],
      "conventions": "",
      "source": "bundled",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "normalize_polynomial",
          "name": "Normalise continuum",
          "params": {
            "order": 3
          }
        },
        {
          "algorithm": "embed_spectrum",
          "name": "Embed (DCT truncation)",
          "params": {
            "dim": 256,
            "strategy": "dct",
            "norm_method": "none"
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/embed_quick/"
    },
    {
      "name": "full_reduction_easyspec",
      "description": "Full CCD-to-1D reduction routed through the EasySpec shelf: build the master bias / dark / flat, apply them to the science frame, remove cosmic rays and extract a 1-D pixel-index spectrum. Wavelength calibration, atmospheric extinction and flux calibration are separate steps afterwards because each needs runtime metadata (arc-lamp identifications, airmass, standard star). Everything that depends on your night lives in the variables below: supply them with a profile (--profile night.yaml) or --set name=value.",
      "version": "2.0.0",
      "kind": "reduction",
      "status": "reference",
      "requires": ">=0.7",
      "references": [
        "EasySpec (Duarte 2024, https://github.com/ranieremenezes/easyspec)",
        "Howell 2006, Handbook of CCD Astronomy, 2nd ed., ch. 4 (calibration frames)"
      ],
      "conventions": "",
      "source": "bundled",
      "n_variables": 10,
      "variables": [
        {
          "name": "bias_dir",
          "type": "path",
          "required": true,
          "description": "directory of raw bias frames"
        },
        {
          "name": "dark_dir",
          "type": "path",
          "required": true,
          "description": "directory of raw dark frames"
        },
        {
          "name": "flat_dir",
          "type": "path",
          "required": true,
          "description": "directory of raw flat frames"
        },
        {
          "name": "science_path",
          "type": "path",
          "required": true,
          "description": "raw science frame (FITS)"
        },
        {
          "name": "target_name",
          "type": "str",
          "required": false,
          "description": "object name written in the extracted spectrum",
          "default": "target"
        },
        {
          "name": "exposure_seconds",
          "type": "float",
          "required": true,
          "description": "exposure time of the science frame (s)"
        },
        {
          "name": "airmass",
          "type": "float",
          "required": true,
          "description": "airmass of the science frame"
        },
        {
          "name": "gain",
          "type": "float",
          "required": false,
          "description": "detector gain (e-/ADU); leave unset to read the GAIN header keyword",
          "default": null
        },
        {
          "name": "readnoise",
          "type": "float",
          "required": false,
          "description": "read noise (e-); leave unset to read the RDNOISE header keyword",
          "default": null
        },
        {
          "name": "combine_method",
          "type": "str",
          "required": false,
          "description": "combination method for the master frames",
          "default": "median",
          "choices": [
            "median",
            "mean"
          ]
        }
      ],
      "steps": [
        {
          "algorithm": "bias_combine_easyspec",
          "name": "Master bias (easyspec)",
          "params": {
            "bias_dir": "${bias_dir}",
            "method": "${combine_method}"
          }
        },
        {
          "algorithm": "dark_combine_easyspec",
          "name": "Master dark (easyspec)",
          "params": {
            "dark_dir": "${dark_dir}",
            "method": "${combine_method}"
          }
        },
        {
          "algorithm": "flat_combine_easyspec",
          "name": "Master flat (easyspec)",
          "params": {
            "flat_dir": "${flat_dir}",
            "method": "${combine_method}"
          }
        },
        {
          "algorithm": "subtract_bias_easyspec",
          "name": "Subtract master bias (easyspec)",
          "params": {
            "target_path": "${science_path}"
          }
        },
        {
          "algorithm": "subtract_dark_easyspec",
          "name": "Subtract master dark (easyspec)",
          "params": {}
        },
        {
          "algorithm": "flat_normalize_easyspec",
          "name": "Divide by normalised flat (easyspec)",
          "params": {
            "auto_normalise": true
          }
        },
        {
          "algorithm": "cosmic_ray_remove_easyspec",
          "name": "Remove cosmic rays (easyspec)",
          "params": {
            "gain": "${gain}",
            "readnoise": "${readnoise}",
            "sigclip": 5.0
          }
        },
        {
          "algorithm": "extract_spectrum_easyspec",
          "name": "Trace + extract 1D (easyspec)",
          "params": {
            "target_name": "${target_name}",
            "exposure_seconds": "${exposure_seconds}",
            "airmass": "${airmass}",
            "mc_steps": 25,
            "extraction_weights": "gaussian"
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/full_reduction_easyspec/"
    },
    {
      "name": "lamp_resolving_power",
      "description": "Resolving power R = lambda / FWHM of a spectrograph from an extracted, wavelength-calibrated arc-lamp (or sky-emission) spectrum: Gaussian fits of the strongest isolated lines, median R and its scatter, and the instrumental FWHM in Angstrom and km/s. A quality-control measurement to report with every campaign submission (BeSS asks for the resolution of each spectrum).",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Gray 2005, The Observation and Analysis of Stellar Photospheres, 3rd ed., ch. 12 - resolving power from the instrumental profile",
        "Tody 1986, Proc. SPIE 627, 733 - IRAF splot Gaussian line measurement"
      ],
      "conventions": "The ten strongest lines isolated by at least 5 Angstrom from any other detection, fitted within +/- 3 Angstrom, detected above 5 times the noise; lines closer than 5 Angstrom to a neighbour are excluded as blends.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "measure_resolving_power",
          "name": "Resolving power from the isolated lamp lines",
          "params": {
            "n_lines": 10,
            "min_separation_aa": 5.0,
            "window_aa": 3.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/lamp_resolving_power/"
    },
    {
      "name": "nova_balmer_decrement",
      "description": "Nebular extinction of a nova, symbiotic star or H II region from the observed H-alpha / H-beta Balmer decrement on a reduced, flux-calibrated (or at least relatively calibrated) spectrum: the two line fluxes are fitted, compared with the Case B intrinsic ratio, and turned into c(H-beta), E(B-V) and A_V with the CCM89 law. The same conventions for every observer of the campaign.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Osterbrock & Ferland 2006, Astrophysics of Gaseous Nebulae and AGN, 2nd ed., Table 4.4 and section 7.2 - Case B decrement and c(H-beta)",
        "Cardelli, Clayton & Mathis 1989, ApJ 345, 245 - the extinction law used to convert c(H-beta) into E(B-V)"
      ],
      "conventions": "Intrinsic H-alpha / H-beta = 2.86 (Case B, T_e = 10^4 K, n_e = 10^2 cm^-3), R_V = 3.1 with the CCM89 law, Gaussian line fluxes within 8 Angstrom of the rest wavelengths. The spectrum must be flux-calibrated in relative terms (the ratio matters, not the absolute scale); a strongly reddened nova with self-absorbed Balmer lines (Case B not applicable) is outside the recipe's validity, as the brick's documentation states.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "snr_der",
          "name": "Signal-to-noise (DER_SNR)",
          "params": {}
        },
        {
          "algorithm": "balmer_decrement_extinction",
          "name": "Balmer decrement to c(H-beta), E(B-V), A_V",
          "params": {
            "intrinsic_ratio": 2.86,
            "rv": 3.1,
            "law": "CCM89",
            "window": 8.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/nova_balmer_decrement/"
    },
    {
      "name": "quality_report",
      "description": "Three independent SNR estimates on the same spectrum: derivative-based (DER_SNR), edge-region, and residual of a linear fit. Disagreement between them is a useful diagnostic of bad regions or strong features.",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "reference",
      "requires": null,
      "references": [],
      "conventions": "",
      "source": "bundled",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "normalize_polynomial",
          "name": "Normalise continuum",
          "params": {
            "order": 3,
            "sigma_clip": 3.0
          }
        },
        {
          "algorithm": "snr_der",
          "name": "SNR — derivative method (Stoehr 2008)",
          "params": {}
        },
        {
          "algorithm": "snr_edge",
          "name": "SNR — edge regions",
          "params": {
            "region_fraction": 0.1
          }
        },
        {
          "algorithm": "snr_linear_fit",
          "name": "SNR — linear-fit residual",
          "params": {}
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/quality_report/"
    },
    {
      "name": "rv_quick",
      "description": "Quick radial-velocity measurement from H-alpha on an already-loaded spectrum: normalise the continuum, then fit the line and turn its centroid shift into a velocity in km/s.",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "reference",
      "requires": null,
      "references": [],
      "conventions": "",
      "source": "bundled",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "normalize_polynomial",
          "name": "Normalise continuum",
          "params": {
            "order": 3,
            "sigma_clip": 3.0
          }
        },
        {
          "algorithm": "measure_radial_velocity",
          "name": "Measure radial velocity from H-alpha",
          "params": {
            "rest_wavelength_angstrom": 6562.79,
            "window_angstrom": 30.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/rv_quick/"
    },
    {
      "name": "snr_check",
      "description": "Quick data-quality check on an already-loaded spectrum: normalise the continuum, then report the signal-to-noise ratio with two independent estimators.",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "reference",
      "requires": null,
      "references": [],
      "conventions": "",
      "source": "bundled",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "normalize_polynomial",
          "name": "Normalise continuum",
          "params": {
            "order": 3,
            "sigma_clip": 3.0
          }
        },
        {
          "algorithm": "snr_der",
          "name": "SNR (derivative method)",
          "params": {}
        },
        {
          "algorithm": "snr_edge",
          "name": "SNR (edge method)",
          "params": {
            "region_fraction": 0.1
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/snr_check/"
    },
    {
      "name": "solar_long_slit",
      "description": "Long-slit solar reduction from a raw 2-D frame: geometric rectification, hot-pixel rejection, band extraction (the Sun fills the slit), wavelength calibration on the Fraunhofer lines (no lamp needed), continuum normalisation and BeSS export. The instrument geometry and the exposure metadata are variables, so one profile per spectrograph serves every solar spectrum.",
      "version": "1.0.0",
      "kind": "reduction",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Howell 2006, Handbook of CCD Astronomy, 2nd ed., ch. 5 - long-slit reduction",
        "Tody 1986, Proc. SPIE 627, 733 - the IRAF reduction tasks this chain mirrors"
      ],
      "conventions": "Extraction sums the brightest row +/- 40 rows; continuum normalised on 6400-6500 Angstrom; a 3rd-order dispersion solution on at least six Fraunhofer lines.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 11,
      "variables": [
        {
          "name": "tilt_deg",
          "type": "float",
          "required": false,
          "description": "slit tilt (deg); 0 = none",
          "default": 0.0
        },
        {
          "name": "slant_deg",
          "type": "float",
          "required": false,
          "description": "line slant (deg); 0 = none",
          "default": 0.0
        },
        {
          "name": "smile_radius",
          "type": "float",
          "required": false,
          "description": "smile radius (px); 0 = none",
          "default": 0.0
        },
        {
          "name": "reference_row",
          "type": "int",
          "required": true,
          "description": "row the geometry is measured on"
        },
        {
          "name": "approx_wavelength_min_angstrom",
          "type": "float",
          "required": true,
          "description": "approximate wavelength of pixel 0"
        },
        {
          "name": "approx_dispersion_angstrom_per_pixel",
          "type": "float",
          "required": true,
          "description": "approximate dispersion"
        },
        {
          "name": "instrument",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "observer",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "site",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "date_obs_utc",
          "type": "str",
          "required": true,
          "description": "ISO-8601 start of exposure (UTC)"
        },
        {
          "name": "exposure_seconds",
          "type": "float",
          "required": true,
          "description": ""
        }
      ],
      "steps": [
        {
          "algorithm": "correct_tilt_affine",
          "name": "",
          "params": {
            "tilt_deg": "${tilt_deg}"
          }
        },
        {
          "algorithm": "correct_slant_affine",
          "name": "",
          "params": {
            "slant_deg": "${slant_deg}",
            "pivot_row": "${reference_row}"
          }
        },
        {
          "algorithm": "correct_smile_polynomial",
          "name": "",
          "params": {
            "reference_row": "${reference_row}",
            "smile_radius": "${smile_radius}",
            "polynomial_order": 4
          }
        },
        {
          "algorithm": "outlier_rejection_mad_adaptive",
          "name": "",
          "params": {
            "kernel_size": 3,
            "threshold": 3.0
          }
        },
        {
          "algorithm": "extract_spectrum_sum",
          "name": "",
          "params": {
            "dispersion_axis": 1,
            "half_width": 40
          }
        },
        {
          "algorithm": "wavelength_calibration_solar",
          "name": "",
          "params": {
            "approx_wavelength_min_angstrom": "${approx_wavelength_min_angstrom}",
            "approx_dispersion_angstrom_per_pixel": "${approx_dispersion_angstrom_per_pixel}",
            "poly_order": 3,
            "min_lines_for_fit": 6
          }
        },
        {
          "algorithm": "normalize_to_region",
          "name": "",
          "params": {
            "wave_lo": 6400.0,
            "wave_hi": 6500.0
          }
        },
        {
          "algorithm": "export_fits_bess",
          "name": "",
          "params": {
            "object_name": "Sun",
            "instrument": "${instrument}",
            "site": "${site}",
            "observer": "${observer}",
            "date_obs_utc": "${date_obs_utc}",
            "exposure_seconds": "${exposure_seconds}",
            "vhelio_kms": 0.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/solar_long_slit/"
    },
    {
      "name": "star_activity_caii_hk",
      "description": "Mount Wilson S index from the Ca II H and K line cores of a reduced stellar spectrum (Vaughan, Preston & Wilson 1978), and log R'_HK when the star's B-V colour is given (Noyes et al. 1984). The standard chromospheric activity measurement for exoplanet-host and solar-type star monitoring.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Vaughan, Preston & Wilson 1978, PASP 90, 267 - the HKP-2 S index bandpasses",
        "Duncan et al. 1991, ApJS 76, 383 - the Mount Wilson survey and its alpha calibration",
        "Noyes et al. 1984, ApJ 279, 763 - R'_HK from S and B-V"
      ],
      "conventions": "Triangular 1.09 Angstrom H and K bands at 3968.47 and 3933.66 Angstrom, 20 Angstrom R and V continuum bands at 4001 and 3901 Angstrom, alpha = 2.3 (echelle convention). The instrumental S is NOT on the Mount Wilson scale until a linear calibration is derived for your spectrograph: pass it as s_index_calibration once you have it, otherwise compare only your own measurements with each other.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 2,
      "variables": [
        {
          "name": "b_v",
          "type": "float",
          "required": false,
          "description": "B-V colour of the star; enables log R'_HK (leave unset otherwise)",
          "default": null
        },
        {
          "name": "s_index_calibration",
          "type": "list",
          "required": false,
          "description": "[slope, offset] mapping your instrumental S onto the Mount Wilson scale, once derived",
          "default": null
        }
      ],
      "steps": [
        {
          "algorithm": "snr_der",
          "name": "Signal-to-noise (DER_SNR)",
          "params": {}
        },
        {
          "algorithm": "activity_index_caii_hk",
          "name": "Ca II H and K S index",
          "params": {
            "alpha": 2.3,
            "b_v": "${b_v}",
            "s_index_calibration": "${s_index_calibration}"
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/star_activity_caii_hk/"
    },
    {
      "name": "star_activity_halpha",
      "description": "H-alpha chromospheric activity index of a reduced stellar spectrum, after Gomes da Silva et al. (2011): the mean flux in a 1.6 Angstrom core over the sum of two nearby continuum bands. The red-arm companion of the Ca II H and K S index, usable on any spectrograph that covers H-alpha.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Gomes da Silva et al. 2011, A&A 534, A30 - the H-alpha index bandpasses",
        "Boisse et al. 2009, A&A 495, 959 - the original H-alpha index definition"
      ],
      "conventions": "1.6 Angstrom core centred on 6562.808 Angstrom, reference bands 6550.87 +/- 5.375 and 6580.31 +/- 4.375 Angstrom, as published; no free parameter. The spectrum must be in the star's rest frame to better than ~0.3 Angstrom (a barycentric correction alone is not enough for a high radial-velocity star: shift it first with doppler_shift if needed).",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "snr_der",
          "name": "Signal-to-noise (DER_SNR)",
          "params": {}
        },
        {
          "algorithm": "activity_index_halpha",
          "name": "H-alpha activity index",
          "params": {}
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/star_activity_halpha/"
    },
    {
      "name": "star_vsini_fourier",
      "description": "Projected rotational velocity v sin i of a star from the first zero of the Fourier transform of one isolated absorption line (Carroll 1933; Gray 2005), on a continuum-normalised, reduced spectrum. The line, its window and the limb-darkening coefficient depend on the star and on your resolution, so they are variables.",
      "version": "1.0.0",
      "kind": "campaign",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Carroll 1933, MNRAS 93, 478 - zeros of the Fourier transform of the rotation profile",
        "Gray 2005, The Observation and Analysis of Stellar Photospheres, 3rd ed., ch. 18",
        "Dravins, Lindegren & Torkelsson 1990, A&A 237, 137 - q1 as a function of the limb darkening",
        "Diaz, Gonzalez, Levato & Grosso 2011, A&A 531, A143 - the Fourier v sin i recipe"
      ],
      "conventions": "Continuum normalised with a 3rd-order polynomial and 3-sigma clipping before the transform; the method is valid only when the rotational broadening dominates the instrumental profile (v sin i above roughly twice the instrumental FWHM in velocity): the brick refuses unresolved lines and reports the Fourier noise floor so the acceptance of the zero can be judged.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 3,
      "variables": [
        {
          "name": "line_center_angstrom",
          "type": "float",
          "required": true,
          "description": "rest wavelength (air) of an isolated absorption line, e.g. Mg II 4481.13 for A stars, Fe I 6430.85 for cooler stars"
        },
        {
          "name": "window_angstrom",
          "type": "float",
          "required": false,
          "description": "half-window around the line, wide enough to reach the continuum on both sides (about 2-3 times lambda * v sin i / c plus margin)",
          "default": 5.0
        },
        {
          "name": "epsilon",
          "type": "float",
          "required": false,
          "description": "linear limb-darkening coefficient of the star at the line's wavelength",
          "default": 0.6
        }
      ],
      "steps": [
        {
          "algorithm": "normalize_polynomial",
          "name": "Continuum normalisation",
          "params": {
            "order": 3,
            "sigma_clip": 3.0
          }
        },
        {
          "algorithm": "vsini_fourier",
          "name": "v sin i from the Fourier first zero",
          "params": {
            "line_center_angstrom": "${line_center_angstrom}",
            "window_angstrom": "${window_angstrom}",
            "epsilon": "${epsilon}"
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/star_vsini_fourier/"
    },
    {
      "name": "stellar_long_slit",
      "description": "Long-slit stellar reduction from a raw 2-D frame with an arc lamp: geometric rectification, hot-pixel rejection, sky subtraction on both sides of the trace, aperture extraction, polynomial wavelength solution from the lamp identifications, continuum normalisation and BeSS export.",
      "version": "1.0.0",
      "kind": "reduction",
      "status": "draft",
      "requires": ">=0.7",
      "references": [
        "Howell 2006, Handbook of CCD Astronomy, 2nd ed., ch. 5 - long-slit reduction",
        "Horne 1986, PASP 98, 609 - sky estimate from the rows flanking the trace",
        "Tody 1986, Proc. SPIE 627, 733 - IRAF identify / dispcor"
      ],
      "conventions": "Sky fitted column by column on 10-row bands 4 rows away from the trace; aperture of +/- 6 rows; 3rd-order dispersion solution; continuum normalised on 6400-6500 Angstrom. Lamp identifications come from match_lamp_lines or reidentify_arc_features run on the lamp frame with the same geometry.",
      "source": "package:spectro-kernel-recipes",
      "n_variables": 12,
      "variables": [
        {
          "name": "tilt_deg",
          "type": "float",
          "required": false,
          "description": "",
          "default": 0.0
        },
        {
          "name": "slant_deg",
          "type": "float",
          "required": false,
          "description": "",
          "default": 0.0
        },
        {
          "name": "smile_radius",
          "type": "float",
          "required": false,
          "description": "",
          "default": 0.0
        },
        {
          "name": "reference_row",
          "type": "int",
          "required": true,
          "description": "row of the stellar trace"
        },
        {
          "name": "lamp_pixels",
          "type": "list",
          "required": true,
          "description": "pixel_positions from match_lamp_lines"
        },
        {
          "name": "lamp_wavelengths",
          "type": "list",
          "required": true,
          "description": "wavelengths_angstrom from match_lamp_lines"
        },
        {
          "name": "object_name",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "instrument",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "observer",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "site",
          "type": "str",
          "required": true,
          "description": ""
        },
        {
          "name": "date_obs_utc",
          "type": "str",
          "required": true,
          "description": "ISO-8601 start of exposure (UTC)"
        },
        {
          "name": "exposure_seconds",
          "type": "float",
          "required": true,
          "description": ""
        }
      ],
      "steps": [
        {
          "algorithm": "correct_tilt_affine",
          "name": "",
          "params": {
            "tilt_deg": "${tilt_deg}"
          }
        },
        {
          "algorithm": "correct_slant_affine",
          "name": "",
          "params": {
            "slant_deg": "${slant_deg}",
            "pivot_row": "${reference_row}"
          }
        },
        {
          "algorithm": "correct_smile_polynomial",
          "name": "",
          "params": {
            "reference_row": "${reference_row}",
            "smile_radius": "${smile_radius}",
            "polynomial_order": 4
          }
        },
        {
          "algorithm": "outlier_rejection_mad_adaptive",
          "name": "",
          "params": {
            "kernel_size": 3,
            "threshold": 3.0
          }
        },
        {
          "algorithm": "subtract_sky_2d",
          "name": "",
          "params": {
            "trace_row": "${reference_row}",
            "trace_half_width": 6,
            "sky_offset": 4,
            "sky_half_width": 10
          }
        },
        {
          "algorithm": "extract_spectrum_sum",
          "name": "",
          "params": {
            "dispersion_axis": 1,
            "half_width": 6
          }
        },
        {
          "algorithm": "wavelength_calibrate_polynomial",
          "name": "",
          "params": {
            "pixel_positions": "${lamp_pixels}",
            "wavelengths_angstrom": "${lamp_wavelengths}",
            "order": 3
          }
        },
        {
          "algorithm": "normalize_to_region",
          "name": "",
          "params": {
            "wave_lo": 6400.0,
            "wave_hi": 6500.0
          }
        },
        {
          "algorithm": "export_fits_bess",
          "name": "",
          "params": {
            "object_name": "${object_name}",
            "instrument": "${instrument}",
            "site": "${site}",
            "observer": "${observer}",
            "date_obs_utc": "${date_obs_utc}",
            "exposure_seconds": "${exposure_seconds}",
            "vhelio_kms": 0.0
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/stellar_long_slit/"
    },
    {
      "name": "time_series_overview",
      "description": "Stack many epochs of the same target into one master spectrum and render a dynamic-spectrum heatmap, a 3D surface and an animated frame-by-frame view — the three complementary visualisations of spectral variability.",
      "version": "1.0.0",
      "kind": "analysis",
      "status": "reference",
      "requires": null,
      "references": [],
      "conventions": "",
      "source": "bundled",
      "n_variables": 0,
      "variables": [],
      "steps": [
        {
          "algorithm": "stack_spectra",
          "name": "Stack spectra (median, robust)",
          "params": {
            "method": "median"
          }
        },
        {
          "algorithm": "plot_dynamic_spectrum",
          "name": "Dynamic spectrum (heatmap)",
          "params": {
            "title": "dynamic spectrum"
          }
        },
        {
          "algorithm": "plot_3d_surface_plotly",
          "name": "3D surface",
          "params": {
            "title": "stacked spectra — 3D surface"
          }
        },
        {
          "algorithm": "plot_animation_plotly",
          "name": "Animation across epochs",
          "params": {
            "title": "stacked spectra — animation"
          }
        }
      ],
      "valid": true,
      "docs_url": "https://docs.spectrokernel.io/recipes/catalogue/time_series_overview/"
    }
  ]
}
