Skip to content

Commit

Permalink
Merge pull request #60 from NREL/yoy_2_year_check_fix
Browse files Browse the repository at this point in the history
Fix erroneous check for two years of data
  • Loading branch information
cdeline authored Feb 7, 2018
2 parents 5005072 + 3d11204 commit 01dfbcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdtools/degradation.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def degradation_year_on_year(normalized_energy, recenter=True, exceedance_prob=9
raise ValueError('normalized_energy must not be more frequent than daily')

# Detect less than 2 years of data
if normalized_energy.index[-1] - normalized_energy.index[1] < pd.Timedelta('730h'):
if normalized_energy.index[-1] - normalized_energy.index[0] < pd.Timedelta('730d'):
raise ValueError('must provide at least two years of normalized energy')

# Auto center
Expand Down

0 comments on commit 01dfbcc

Please sign in to comment.