pvlib.spectrum.sr_to_qe#

pvlib.spectrum.sr_to_qe(sr, wavelength=None, normalize=False)[source]#

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

Provide wavelengths in nanometers, [nm].

Conversion is described in 1.

New in version 0.11.0.

Parameters
  • sr (numeric, pandas.Series or pandas.DataFrame) – Spectral response, [A/W]. Index must be the wavelength in nanometers, [nm].

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

  • normalize (bool, default False) – If True, the quantum efficiency 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

quantum_efficiency (numeric, same type as sr) – Quantum efficiency, in the interval [0, 1].

Notes

  • If sr 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 sr.

Examples

>>> import numpy as np
>>> import pandas as pd
>>> from pvlib import spectrum
>>> wavelengths = np.array([350, 550, 750])
>>> spectral_response = np.array([0.25, 0.40, 0.57])
>>> quantum_efficiency = spectrum.sr_to_qe(spectral_response, wavelengths)
>>> print(quantum_efficiency)
array([0.88560142, 0.90170326, 0.94227991])
>>> spectral_response_series = pd.Series(spectral_response, index=wavelengths, name="dataset")
>>> qe = spectrum.sr_to_qe(spectral_response_series)
>>> print(qe)
350    0.885601
550    0.901703
750    0.942280
Name: dataset, dtype: float64
>>> qe = spectrum.sr_to_qe(spectral_response_series, normalize=True)
>>> print(qe)
350    0.939850
550    0.956938
750    1.000000
Name: dataset, dtype: float64

References

1

“Spectral Response,” PV Performance Modeling Collaborative (PVPMC). https://pvpmc.sandia.gov/modeling-guide/2-dc-module-iv/effective-irradiance/spectral-response/

2

“Spectral Response | PVEducation,” www.pveducation.org. https://www.pveducation.org/pvcdrom/solar-cell-operation/spectral-response