fit_spectrum_typed

Function fit_spectrum_typed 

Source
pub fn fit_spectrum_typed(
    input: &InputData,
    config: &UnifiedFitConfig,
) -> Result<SpectrumFitResult, PipelineError>
Expand description

Fit a single spectrum using the typed input data API.

Dispatches to the correct fitting engine based on the InputData variant and solver configuration:

InputSolverPath
TransmissionLMLM chi-squared with optional SAMMY background
TransmissionKLPoisson NLL on transmission with optional background
CountsKLPoisson NLL on raw counts (statistically optimal)
CountsLMConvert to T internally and route to LM
CountsWithNuisanceKLDirect Poisson with user-supplied nuisance