Subsets a spectrum or dataset to a wavelength range.
Arguments
- x
A
ls_spectrum()orls_dataset()object.- min_nm
Numeric. Minimum wavelength (nm). Default
NULL= no lower bound.- max_nm
Numeric. Maximum wavelength (nm). Default
NULL= no upper bound.
Examples
spec <- ls_simulate_spectrum(seed = 1)
ls_crop(spec, 380, 450)
#> <libs_spectrum>
#> • Range: 380.21-449.98 nm (205 channels)
#> • Shots: 10
#> • Sample: "simulated" (synthetic)
#> • Baseline corrected: FALSE