uvvis.load

uvvis.load(filename, lmin=-1, lmax=-1, smooth=True, delim=None)

Loads a spectrum / set of spectra from ASCII file(s). Expects the first column to be wavelength. Text lines are ignored, i.e., this function can be used to load Ocean Optics text files, for instance.

Parameters:
  • filename (str) – Filename(s) of the file(s) to load. Supports wildcards via glob. If several files match the pattern, the returned data is the average over these files.
  • lmin (float) – Set minimum wavelength of returned data (same units as stored wavelength). Return all when -1 (default).
  • lmax (float) – Set maximum wavelength of returned data (same units as stored wavelength). Return all when -1 (default).
  • smooth (bool) – If True, apply denoise() to data before returning (default).
  • delim (str) – Delimiter argument to be passed to numpy.loadtxt(). Set to None to use any whitespace (default).
Returns:

Wavelength axis and spectrum.