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:
| Input | Solver | Path |
|---|---|---|
| Transmission | LM | LM chi-squared with optional SAMMY background |
| Transmission | KL | Poisson NLL on transmission with optional background |
| Counts | KL | Poisson NLL on raw counts (statistically optimal) |
| Counts | LM | Convert to T internally and route to LM |
| CountsWithNuisance | KL | Direct Poisson with user-supplied nuisance |