You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optional output bounding for wvm() clear-sky index output #2660
Is your feature request related to a problem? Please describe.
The wvm() function in pvlib.scaling can produce negative or unrealistically large clear-sky index values as a result of wavelet reconstruction. While this behavior is mathematically expected, such values are physically non-meaningful and can cause issues when the output is used directly in irradiance or PV power modeling workflows. Currently, users must manually post-process the output to enforce physical bounds.
Describe the solution you'd like
Add an optional output bounding (clipping) capability to wvm(), allowing users to constrain the smoothed clear-sky index to physically meaningful limits. For example, optional parameters such as clip, clip_min, and clip_max could be provided, with default behavior remaining unchanged to preserve backward compatibility.
Describe alternatives you've considered
Manually clipping the output of wvm() in user code before passing it to downstream models. While this works, it leads to duplicated logic across projects and inconsistent handling of physical bounds.
Additional context
Wavelet-based reconstruction methods are known to overshoot, and bounding is commonly applied as a post-processing step in PV modeling workflows. Providing this option directly in wvm() would improve usability while maintaining mathematical correctness and backward compatibility.
Closing this issue due to doubt about the author having prior knowledge of solar energy. While we strongly encourage new contributors, making meaningful contributions to pvlib requires some knowledge of solar energy.
If this is incorrect, please tag me.
Reacted by Echedey Luis, Kevin Anderson and Purva Thakre
Activity
Chirag3841 commentedon Jan 24, 2026
@EricDuminil I would like to solve this issue if anyone had not taken it yet.
AdamRJensen commentedon Jan 24, 2026
Closing this issue due to doubt about the author having prior knowledge of solar energy. While we strongly encourage new contributors, making meaningful contributions to pvlib requires some knowledge of solar energy.
If this is incorrect, please tag me.