lfkit.corrections.kcorrect_backend#

kcorrect backend construction utilities.

This module provides a small wrapper around kcorrect.Kcorrect that standardizes how LFKit creates and reuses backend instances.

A kcorrect backend depends on the set of input responses, output responses, and the redshift grid used internally by the solver. Constructing this object can be relatively expensive, so LFKit builds and caches instances associated with a specific response configuration.

The wrapper also ensures that requested filter response names exist before initializing the backend and allows optional use of custom response directories when supported by the installed kcorrect version.

Functions

build_kcorrect(*, responses_in[, ...])

Create a kcorrect backend configured for a specific response setup.