-
Notifications
You must be signed in to change notification settings - Fork 295
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
Fix nominal end time in AHI HSD #2742
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2742 +/- ##
=======================================
Coverage 95.88% 95.89%
=======================================
Files 371 371
Lines 52835 52847 +12
=======================================
+ Hits 50663 50677 +14
+ Misses 2172 2170 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 7928501394Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I'm having trouble understanding this sentence, sorry. When you say "observation_end_time" are you referring to |
The new code I think I do understand and looks good to me. One fear is that if the observation times (start or end) coming from the file are ever before the theoretical nominal time then the rounding will give the wrong answer. This isn't something new introduced in this PR, but correct me if I'm wrong: FLDK theoretical start at 12:00:00. Time in file is 11:59:59.999. Replacing the start time hours/minutes/seconds would put this at 11:50:00, wouldn't it? Or does the |
I meant
Oh, nice catch! I think the 11:59 case would still work because hours/minutes/seconds are snapped to the timeline variable. But at midnight it doesn't work anymore, for example
I'll try to take that into account |
I wouldn't rely on that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Awesome job. It is surprising and almost sad how much code had to go into get a start and end time, but it is what it is. Thanks for putting all this work into it. |
Haha, True. But I enjoyed it somehow 😃 |
I noticed that for AHI HSD, the attributes
start_time/end_time
andnominal_start_time/nominal_end_time
are identical.Output:
This has two reasons:
end_time
property returnsnominal_start_time
. See https://github.com/pytroll/satpy/blob/main/satpy/readers/ahi_hsd.py#L417observation_end_time
(e.g. 03:10:12.34567 for a full disk scan) is rounded to the "observation timeline" (03:00:00 or "0300" in the header). See https://github.com/pytroll/satpy/blob/main/satpy/readers/ahi_hsd.py#L473. Here, the offsetdt
only accounts for the start of the scan, not the total scan duration.To fix this, I modified the
nominal_end_time
property to add the scan duration to the nominal start time.AUTHORS.md
if not there already