Skip to content

Implement a spectral binning algorithm #2861

Description

@RDaxini

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions