Skip to content

Commit

Permalink
Merge pull request #16 from gregstarr/develop
Browse files Browse the repository at this point in the history
fixing issue with duplicate times at day boundaries
  • Loading branch information
gregstarr authored Jun 25, 2022
2 parents 795a4a7 + 9bd0c5d commit c8d7bb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test_trough.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def test_script_multiple_config():

@pytest.mark.slow
def test_date_error():
start_date = datetime(2015, 3, 17)
start_date = datetime(2015, 3, 15)
end_date = datetime(2015, 3, 18)
n_times = 1 + ((end_date - start_date) / timedelta(minutes=30))
with TemporaryDirectory() as tempdir:
Expand Down
2 changes: 1 addition & 1 deletion trough/_trough.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def label_trough_dataset(start_date, end_date, params=None, tec_dir=None, arb_di
start = max(start_date, start)
end = min(end_date, end)
data = label_trough_interval(start, end, params, hemisphere, tec_dir, arb_dir, omni_file)
if end.year == start.year + 1:
if end != end_date:
data = data.isel(time=slice(0, -1))
labels.append(data['labels'])
scores.append(data['score'])
Expand Down

0 comments on commit c8d7bb0

Please sign in to comment.