Closed matteobachetti closed 9 months ago
Hello @matteobachetti! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
5777271
) 96.27% compared to head (5778e1f
) 96.39%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Good point. Sometimes I tend to think about the logic that makes it easier to cover all options with tests, rather than making the code easier to read 😅. I changed the logic slightly following your suggested approach
In
StingrayTimeseries.fill_bad_time_intervals
, when the buffer size is small and count rates are low, there was the possibility that the count rate estimation failed with a numpy error. E.g., the testtest_no_counts_in_buffer
I added failed. Here, I catch the condition and warn that this is happening. Also, I made the estimation more robust when only one of the GTIs on the side of the bad time intervals has good data.