8000 Correct slope calculation in clearsky.detect_clearsky by cwhanse · Pull Request #1242 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Correct slope calculation in clearsky.detect_clearsky #1242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 25, 2021

Conversation

cwhanse
Copy link
Member
@cwhanse cwhanse commented Jun 4, 2021

Adds a test with time interval of 2 minutes.

@cwhanse cwhanse added the bug label Jun 4, 2021
@cwhanse cwhanse added this to the 0.9.0 milestone Jun 4, 2021
Copy link
Member
@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this bug affected 0.8.1 so this needs a whatsnew entry, right?

with np.errstate(divide='ignore', invalid='ignore'):
raw = np.diff(data)
raw = np.diff(data) / sample_interval
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow I failed to include this comment earlier: is raw here equivalent to data_slope.values[:-1]? If so there might be some modest speedup to be had by passing that in to avoid calculating slope twice.

@wholmgren
Copy link
Member

Thanks @cwhanse

@wholmgren wholmgren merged commit 8fe6a43 into pvlib:master Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Std. deviation of slope is calculated incorrectly for clearsky.detect_clearsky
3 participants
0