Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-26171: calibrations cannot be retrieved on the last day of a validity range #401

Merged
merged 1 commit into from Jul 31, 2020

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Jul 30, 2020

Remove single-day gaps in validation ranges.

@@ -175,7 +175,7 @@ def fixSubsetValidity(self, conn, table, detectorData, validity):
if valids[date][1] > midpoint:
nextDate = dates[i + 1]
valids[nextDate][0] = midpoint + datetime.timedelta(1)
valids[date][1] = midpoint
valids[date][1] = midpoint + datetime.timedelta(1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you find a way to confirm that this part of the fix is correct experimentally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial change removed the + datetime.timedelta(1) on line 177. However, this resulted in both validEnd_i and validStart_{i+1} being one day early. That was clearly wrong, as the calibDate was not contained within the range, leading to this version that increments both fields.

@czwa czwa merged commit 198ee8d into master Jul 31, 2020
@timj timj deleted the tickets/DM-26171 branch February 18, 2021 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants