pvlib.spectrum.sr_to_qe#
- pvlib.spectrum.sr_to_qe(sr, wavelength=None, normalize=False)[source]#
- Convert spectral responsivities to quantum efficiencies. If - wavelengthis not provided, the spectral responsivity- srmust be a- pandas.Seriesor- 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:
- 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 - sris of type- pandas.Seriesor- pandas.DataFrame, column names will remain unchanged in the returned object.
- If - wavelengthis 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 - See also 
