diff --git a/dishHistoryStats.py b/dishHistoryStats.py index 5dd1a51..1a11d78 100644 --- a/dishHistoryStats.py +++ b/dishHistoryStats.py @@ -150,7 +150,10 @@ for i in sampleRange: totUnschedD += d if d >= 1: totUnschedOne += d - if historyData.obstructed[i]: + # scheduled=false and obstructed=true do not ever appear to overlap, + # but in case they do in the future, treat that as just unscheduled + # in order to avoid double-counting it. + elif historyData.obstructed[i]: totObstruct += 1 totObstructD += d if d >= 1: diff --git a/parseJsonHistory.py b/parseJsonHistory.py index b7a993d..0817914 100644 --- a/parseJsonHistory.py +++ b/parseJsonHistory.py @@ -153,7 +153,10 @@ for i in sampleRange: totUnschedD += d if d >= 1: totUnschedOne += d - if historyData["obstructed"][i]: + # scheduled=false and obstructed=true do not ever appear to overlap, + # but in case they do in the future, treat that as just unscheduled + # in order to avoid double-counting it. + elif historyData["obstructed"][i]: totObstruct += 1 totObstructD += d if d >= 1: