Is your feature request related to a problem? Please describe.
I'd like to gauge interest in adding a spectral binning algorithm from Witteck et al. (2024). It would complement existing spectral tools (e.g. spectra simulation, pvlib.spectrum.average_photon_energy) and help users working with spectral data from other popular sources such as NSRDB and MIDC.
Describe the solution you'd like
A function that reduces high-resolution spectral irradiance data to a smaller representative set of energy-weighted spectra, cutting computational cost while maintaining accuracy. The published method exploits the fact that most PV energy is generated over a narrow spectral range, so a few binned spectra can represent extended periods of field conditions.
I propose this lives in either pvlib.spectrum.irradiance or as its own module in pvlib.spectrum.binning. My preference is the latter. Implementation would be one public function (signature TBD, maybe spectral_binning(spectra, n_bins...) with some private helpers to calculate bin edges, energy weighting, etc.
Describe alternatives you've considered
n/a
Additional context
Code has been published internally but some work would be required to rework it into the style/conventions of pvlib. Tests also need to be written. I would be available to push this implementation forward in October, following discussion in this issue. I currently work closely with the authors, on another project, so technical oversight is available.
Is your feature request related to a problem? Please describe.
I'd like to gauge interest in adding a spectral binning algorithm from Witteck et al. (2024). It would complement existing spectral tools (e.g. spectra simulation,
pvlib.spectrum.average_photon_energy) and help users working with spectral data from other popular sources such as NSRDB and MIDC.Describe the solution you'd like
A function that reduces high-resolution spectral irradiance data to a smaller representative set of energy-weighted spectra, cutting computational cost while maintaining accuracy. The published method exploits the fact that most PV energy is generated over a narrow spectral range, so a few binned spectra can represent extended periods of field conditions.
I propose this lives in either
pvlib.spectrum.irradianceor as its own module inpvlib.spectrum.binning. My preference is the latter. Implementation would be one public function (signature TBD, maybespectral_binning(spectra, n_bins...)with some private helpers to calculate bin edges, energy weighting, etc.Describe alternatives you've considered
n/a
Additional context
Code has been published internally but some work would be required to rework it into the style/conventions of pvlib. Tests also need to be written. I would be available to push this implementation forward in October, following discussion in this issue. I currently work closely with the authors, on another project, so technical oversight is available.