gwpy / gwsumm

Gravitational-wave interferometer summary information system
GNU General Public License v3.0
12 stars 23 forks source link

Fix for gaps in segments causing unfilled pie chart plots #392

Closed eagoetz closed 7 months ago

eagoetz commented 8 months ago

This PR addresses a problem that there could be gaps in the segments, thus resulting in pie chart plots that can remain unfilled.

Here is an example for O4a.3: https://ldas-jobs.ligo.caltech.edu/~evan.goetz/summary/gps/1384873218-1389456018/segments/ Here is an example for "O4a.4" Dec 1 2023 - Jan 31 2024 ran on Jan 25 2024: https://ldas-jobs.ligo.caltech.edu/~evan.goetz/summary/gps/1385424018-1390694418/segments/

For reference, this is what the "O4a.4" interval run using the current gwsumm code: https://ldas-jobs.ligo.caltech.edu/~evan.goetz/summary/gps/1385424018-1390694419/segments/

We might consider changing the colors for the single IFO pie wedges in the .ini configuration file since the red pie wedges tend to blend together. Or we can chose a different color for the "Missing segments" wedge

codecov[bot] commented 8 months ago

Codecov Report

Attention: 50 lines in your changes are missing coverage. Please review.

Comparison is base (b007282) 50.17% compared to head (e0b11f7) 49.96%.

Files Patch % Lines
gwsumm/plot/segments.py 0.00% 49 Missing :warning:
gwsumm/segments.py 88.89% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #392 +/- ## ========================================== - Coverage 50.17% 49.96% -0.21% ========================================== Files 60 60 Lines 8686 8729 +43 ========================================== + Hits 4358 4361 +3 - Misses 4328 4368 +40 ``` | [Flag](https://app.codecov.io/gh/gwpy/gwsumm/pull/392/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | Coverage Δ | | |---|---|---| | [Linux](https://app.codecov.io/gh/gwpy/gwsumm/pull/392/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.96% <13.79%> (-0.21%)` | :arrow_down: | | [python3.10](https://app.codecov.io/gh/gwpy/gwsumm/pull/392/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.96% <13.79%> (-0.21%)` | :arrow_down: | | [python3.11](https://app.codecov.io/gh/gwpy/gwsumm/pull/392/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.96% <13.79%> (-0.21%)` | :arrow_down: | | [python3.9](https://app.codecov.io/gh/gwpy/gwsumm/pull/392/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.96% <13.79%> (-0.21%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

eagoetz commented 8 months ago

@iaraota We should go over this together on a Zoom call soon. I think this bug fix also would fix a problem that some folks have been confused about on the summary page pie plots

iaraota commented 7 months ago

@eagoetz thank you for working on this!

I think that removing the blank "future segment" when the run is not complete could potentially lead to increased confusion, as the percentages do not add up to 100%.

Additionally, there's a discrepancy with the O4a.3 percentages, summing to 99.9%. Is this possibly due to a rounding issue?

eagoetz commented 7 months ago

@iaraota Thanks for the feedback. Maybe I need some more clarification:

eagoetz commented 7 months ago

@eagoetz The percentages are calculated using the full span, and they should be calculated using just the time covered so far in the pie chart

eagoetz commented 7 months ago

There also appears to be a bug in the total time calculation that the DMT-ANALYSIS_READY for H1 in O4a.3 is nearly 100% and yet we're finding a missing segment amount for the network of ~1.5%. This seems excessive and needs to be investigated as a potential bug

iaraota commented 7 months ago

@eagoetz Is the "O4a.4 page" the last version of the code? I ask because the percentages on this page exceed 100%.

eagoetz commented 7 months ago

@eagoetz Is the "O4a.4 page" the last version of the code? I ask because the percentages on this page exceed 100%.

Good catch, I'll take a look

eagoetz commented 7 months ago

@iaraota The percentage issue has now been addressed. Let me know if you have further feedback. Thanks!