The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Resampling Spectra

Jose Eduardo Meireles

January 2025

spectrolab can resample spectra using the method resample. Since version 0.19, spectrolab uses a gaussian model that takes the Full Width at Half Maximum or FWHM to compute the spectrum values at the new bands.

Here s a quick example.

dir_path = system.file("extdata/svc_raw_and_overlap_matched_serbin/SVC_Files_moc", package = "spectrolab")

s_raw     = read_spectra(dir_path)

new_bands = seq(400, 2400, 5)
fwhm      = make_fwhm(s_raw, new_bands)
#> setting k to the number of unique band diff values

s_resamp  = resample(s_raw,new_bands = new_bands, fwhm = fwhm)

plot(s_raw, lwd = 0.5)
plot(s_resamp, add = TRUE, lwd = 0.25, col = "red")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.