Skip to content

pvlib.soiling.hsu does not require rain_accum_period to be a Timedelta #1711

Description

@williamhobbs

Describe the bug
If a user accidentally passes rain_accum_period in pvlib.soiling.hsu as an integer, the function runs without error. Is that desired? I'm concerned that someone could test with hour interval data, in which case rain_accum_period = 1 and rain_accum_period = pd.Timedelta('1h') will give the same results. But, if they later switch to using, e.g., 15-min interval data, rain_accum_period = 1 may give unintended results.

Expected behavior
Either an error for using integers, or clarification in the function's documentation that integers will work but they specify number of intervals instead of number of hours.

Tagging @andrewtrendline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions