Uh oh!
There was an error while loading. Please reload this page.
Update detect_clearsky( ) - #1708
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
from @cwhanse Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
mikofski
commented
Apr 17, 2023
Would it be possible to run the |
eccoope
commented
Apr 18, 2023
Yes - just did this on my local machine. The old function takes 0.4933785000030184 seconds to run 10 times and the version in the PR takes 0.9015975999936927 seconds to do the same. |
cwhanse
left a comment
There was a problem hiding this comment.
IMO the performance hit is worth the enhancement of handling missing timesteps.
Uh oh!
There was an error while loading. Please reload this page.
| points are equal except in the case that data is missing. | ||
| """ | ||
| if times is None: |
There was a problem hiding this comment.
I feel like this if and try should move down and use ispandas, optional cleanup.
| # arrays of different lengths when evaluating comparison criteria and | ||
| # when indexing the Hankel matrix to construct clear_samples | ||
| elif len(clear_sky.index) != len(times): | ||
| clear = pd.Series(clear_sky, index=times) |
There was a problem hiding this comment.
Untested, and I suspect this will fail - clear_sky is a Series of different length than times so it can't get indexed by times.
There was a problem hiding this comment.
Just added a test for this in test_clearsky.py
Uh oh!
There was an error while loading. Please reload this page.
Changed clear_sky back to clearsky
| import pandas as pd | ||
| import pytz | ||
| import warnings | ||
| from .conftest import DATA_DIR |
There was a problem hiding this comment.
This line should be test_tools, that will fix the doc build error.
Move import statement to test_tools.py pt1
Move import statement to test_tools.py pt2
AdamRJensen
commented
Oct 23, 2025
@cwhanse is this still be worked on from Sandias side? |
cwhanse
commented
Oct 23, 2025
Let me talk a look at it. I had forgotten. |
docs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.Modified algorithm in detect_clearsky( ) to support missing timestamps (in a DatetimeIndex of evenly spaced intervals). Supporting functions were also modified to accommodate this change.