Averages shots within a ls_spectrum().
Arguments
- x
A
ls_spectrum()object.- method
Character.
"mean"or"median". Default"mean".- trim
Numeric. Fraction trimmed from each end for trimmed mean. Default 0.
- remove_outliers
Logical. Remove shots with deviation > 3 SD from the per-channel mean. Default
FALSE.
Examples
spec <- ls_simulate_spectrum(n_shots = 10, seed = 1)
ls_average_shots(spec, remove_outliers = TRUE)
#> <libs_spectrum>
#> • Range: 200-900 nm (2048 channels)
#> • Shots: 1
#> • Sample: "simulated" (synthetic)
#> • Baseline corrected: FALSE