Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Implementation of clearsky.detect_clearsky #505

Copy link
Copy link
Closed
@benbenboben

Description

@benbenboben
Issue body actions

I noticed inconsistencies between the pvlib.clearsky.detect_clearsky implementation and the reference it's based on (M. J. Reno and C. W. Hansen, “Identification of periods of clear sky irradiance in time series of GHI measurements,” Renew. Energy, vol. 90, pp. 520–531, 2016.)

The first issue is in the way slopes are calculated. When calculating the slopes, the function implicitly assumes a data frequency of 1 minute (e.g., meas_slope = np.diff(measured[H], n=1, axis=0)). Including the time differences would provide expected behavior and would reflect the equations from the original reference. Furthermore, it may improve the performance of using the default parameters on lower frequency data.

I also believe that the calculation of the final features ("maximum difference between changes in GHI and clear sky time series" from the paper) is incorrectly calculated. The paper shows this feature as the maximum of the absolute element-wise difference between GHI and GHI(cs) slopes for each window (eqn 14). The implementation appears to calculate the difference between the absolute maximum GHI slope and absolute maximum GHI(cs) slope for a given window.

This isn't really a "bug", but tagging it as such seemed like the best option. I'd be happy to resubmit the issue report under a different tag if preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.