MaxScoreOverTranslations.correct_background#
- MaxScoreOverTranslations.correct_background(state, mean=0, inv_std=1, **kwargs)#
Applies flat-fielding correction to scores f as
\[f' = (f - \text{mean}) \cdot \text{inv_std},\]transforming raw correlations to SNR-like scores.
- Parameters:
- statetuple
Current analyzer state as returned
AbstractAnalyzer.init_state()or previous invocations ofAbstractAnalyzer.__call__().- meanBackendArray, optional
Background mean (or equivalent), defaults to 0.
- inv_stdBackendArray, optional
Reciprocal background standard deviation (or equivalent), defaults to 1.
- Returns:
- tuple
Updated analyzer state incorporating the new data.
Notes
This method should be called after all rotations have been processed but before calling
result(). The correction helps distinguish genuine template matches from systematic background artifacts that may arise from template edges, interpolation artifacts, or structured noise in the target.