raman.calibrate

raman.calibrate(y, lambda0, peaks, mol, show=False)

Returns a calibrated x-axis in wavenumbers using a calibration spectrum and a list of vibrational modes.

Parameters:
  • y (array) – Calibration spectrum.
  • lambda0 (float) – Pump wavelength (nm).
  • peaks (array) – List of estimated peak positions in indices.
  • mol (array) – List of associated vibrational frequencies (cm-1). Does not have to have same shape as peaks. If shape is different, use the first min(len(peaks), len(mol)) entries.
  • show (bool) – If True, show a plot of pixel index vs wavelength, False by default.
Returns:

Wavenumber axis with same shape as y (non-equidistantly sampled).

See also

If the wavenumber axis should be sampled equidistantly, use interpolate().

Example:

import FSRStools.raman as fs

lmbda0 = 795.6      # pump wavelength
showCal = True      # display calibration results

# load the calibration spectrum
chex, _, _ = loadFSRS("chex")

# generate wavenumber axis
wn = fs.calibrate(chex, lmbda0, fs.find_peaks(chex, sorted=True), fs.mol_lines('chex', sorted=True), show=showCal)