pvlib.spectrum.qe_to_sr#

pvlib.spectrum.qe_to_sr(qe, wavelength=None, normalize=False)[source]#

Convert quantum efficiencies to spectral responsivities. If wavelength is not provided, the quantum efficiency qe must be a pandas.Series or pandas.DataFrame, with the wavelengths in the index.

Provide wavelengths in nanometers, [nm].

Conversion is described in [1].

Added in version 0.11.0.

Parameters:
  • qe (numeric, pandas.Series or pandas.DataFrame) – Quantum efficiency. If pandas subtype, index must be the wavelength in nanometers, [nm].

  • wavelength (numeric, optional) – Points where quantum efficiency is measured, in nanometers, [nm].

  • normalize (bool, default False) – If True, the spectral response is normalized so that the maximum value is 1. For pandas.DataFrame, normalization is done for each column. For 2D arrays, normalization is done for each sub-array.

Returns:

spectral_response (numeric, same type as qe) – Spectral response, [A/W].

Notes

  • If qe is of type pandas.Series or pandas.DataFrame, column names will remain unchanged in the returned object.

  • If wavelength is provided it will be used independently of the datatype of qe.

Examples

>>> import numpy as np
>>> import pandas as pd
>>> from pvlib import spectrum
>>> wavelengths = np.array([350, 550, 750])
>>> quantum_efficiency = np.array([0.86, 0.90, 0.94])
>>> spectral_response = spectrum.qe_to_sr(quantum_efficiency, wavelengths)
>>> print(spectral_response)
array([0.24277287, 0.39924442, 0.56862085])
>>> quantum_efficiency_series = pd.Series(quantum_efficiency, index=wavelengths, name="dataset")
>>> sr = spectrum.qe_to_sr(quantum_efficiency_series)
>>> print(sr)
350    0.242773
550    0.399244
750    0.568621
Name: dataset, dtype: float64
>>> sr = spectrum.qe_to_sr(quantum_efficiency_series, normalize=True)
>>> print(sr)
350    0.426950
550    0.702128
750    1.000000
Name: dataset, dtype: float64

References