lentil.radiometry.Spectrum.from_csv#

classmethod Spectrum.from_csv(filename, waveunit, valueunit, zero_negatives=True, header_rows=1)[source]#

Create a Spectrum from a csv file.

Parameters:
  • filename (str) – csv file to load

  • waveunit (str) – Wavelength units, as accepted by Unit().

  • valueunit (str) – Value units, as accepted by Unit().

  • zero_negatives (bool, optional) – If true (default), negative values are replaced with zeros.

  • header_rows (int, optional) – Number of header rows in csv file to ignore. Default is 1.