pvlib.spectrum.average_photon_energy#

pvlib.spectrum.average_photon_energy(spectra)[source]#

Calculate the average photon energy of one or more spectral irradiance distributions.

Parameters:

spectra (pandas.Series or pandas.DataFrame) –

Spectral irradiance, must be positive [Wm⁻²nm⁻¹]. See spectra.

A single spectrum must be a pandas.Series with wavelength [nm] as the index, while multiple spectra must be rows in a pandas.DataFrame with column headers as wavelength [nm].

Returns:

ape (numeric or pandas.Series) – Average Photon Energy [eV]. Note: returns np.nan in the case of all-zero spectral irradiance input.

Notes

The average photon energy (APE) is an index used to characterise the solar spectrum. It has been used widely in the physics literature since the 1900s, but its application for solar spectral irradiance characterisation in the context of PV performance modelling was proposed in 2002 [1]. The APE is calculated based on the principle that a photon’s energy is inversely proportional to its wavelength:

\[E_\gamma = \frac{hc}{\lambda},\]

where \(E_\gamma\) is the energy of a photon with wavelength \(\lambda\), \(h\) is the Planck constant, and \(c\) is the speed of light. Therefore, the average energy of all photons within a single spectral irradiance distribution provides an indication of the general shape of the spectrum. A higher average photon energy (shorter wavelength) indicates a blue-shifted spectrum, while a lower average photon energy (longer wavelength) would indicate a red-shifted spectrum. This value of the average photon energy can be calculated by dividing the total energy in the spectrum by the total number of photons in the spectrum as follows [1]:

\[\overline{E_\gamma} = \frac{1}{q} \cdot \frac{\int G(\lambda) \, d\lambda} {\int \Phi(\lambda) \, d\lambda}.\]

\(\Phi(\lambda)\) is the photon flux density as a function of wavelength, \(G(\lambda)\) is the spectral irradiance, \(q\) is the elementary charge used here so that the average photon energy, \(\overline{E_\gamma}\), is expressed in electronvolts (eV). The integrals are computed over the full wavelength range of the spectra parameter.

References

Examples using pvlib.spectrum.average_photon_energy#

Average Photon Energy Calculation

Average Photon Energy Calculation