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

ValueError on clear-sky models page in Users Guide #1914

Copy link
Copy link
@kandersolar

Description

@kandersolar
Issue body actions

The clear-sky docs page has an issue:

In [156]: clear_samples = clearsky.detect_clearsky(ghi, cs['ghi'], cs.index, 10)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-156-a86cb0f5cb3e> in <module>
----> 1 clear_samples = clearsky.detect_clearsky(ghi, cs['ghi'], cs.index, 10)

~/checkouts/readthedocs.org/user_builds/pvlib-python/checkouts/stable/pvlib/clearsky.py in detect_clearsky(measured, clearsky, times, infer_limits, window_length, mean_diff, max_diff, lower_line_length, upper_line_length, var_diff, slope_dev, max_iterations, return_components)
    823     if len(times) < samples_per_window:
    824         raise ValueError(f"times has only {len(times)} entries, but it must \
--> 825                            have at least {samples_per_window} entries")
    826 
    827     # generate matrix of integers for creating windows with indexing

ValueError: times has only 30 entries, but it must                            have at least 50 entries

Presumably the problem is that this code is passing the value 10 by position to the new infer_limits parameter added in #1784 instead of to window_length like it used to. I expect it would be fixed by editing that line in clearsky.rst to specify the parameter by name: window_length=10.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    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.