chemometrics.generate_spectra¶
- chemometrics.generate_spectra(n_wl, n_band, bandwidth)¶
Generate a dummy spectra with n_band
A dummy spectra is generated based on a given number of peaks. The bandwidth, location and height is selected randomly. The center of each peak follows a uniform distribution over the range of the spectra. Each peaks bandwidth is drawn from a gamma distribution. The gamma distribution has a heavy tail resulting in the generation of (also) broad peaks. The peak height is Poisson distributed with a mean height of 5. Each peak in the artificial spectrum follows a Gaussian shape.
- Parameters
n_wl (int) – number of wavelengths/signals to generate
n_band (int) – number of bands to generate
bandwidth (float) – impacts the bandwidth of each band.
- Returns
spectra – artificial spectra
- Return type
ndarray (n_wl, )