gwpy / gwsumm

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

Add NetworkDutyBarPlot class #389

Closed iaraota closed 7 months ago

iaraota commented 9 months ago

This PR introduces the NetworkDutyBarPlot class, designed to generate a bar plot showcasing the duty factor across all combinations of detectors, ranging from individual detectors to a combination of N detectors. Additionally, it enhances the segment information table by incorporating details regarding these combinations.

To illustrate, consider three detectors: H1, L1, and V1. Prior to this pull request, the segment information table in a page with NetworkDutyPiePlot class included rows for H1L1V1:single, H1L1V1:double, and H1L1V1:triple. With this update, it incorporates new entries such as H1L1:double, H1V1:double, and L1V1:double. This enhancement remains scalable for any number of detectors; for instance, with four detectors, the table will encompass all possible combinations of two and three detectors.

iaraota commented 9 months ago

Here is an example with this new class. The new plot is in the second-last row.

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (02cb6f2) 49.96% compared to head (df8f945) 49.68%. Report is 3 commits behind head on master.

:exclamation: Current head df8f945 differs from pull request most recent head 3201f23. Consider uploading reports for the commit 3201f23 to get more accurate results

Files Patch % Lines
gwsumm/plot/segments.py 16.42% 56 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #389 +/- ## ========================================== - Coverage 49.96% 49.68% -0.28% ========================================== Files 60 60 Lines 8729 8804 +75 ========================================== + Hits 4361 4374 +13 - Misses 4368 4430 +62 ``` | [Flag](https://app.codecov.io/gh/gwpy/gwsumm/pull/389/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/389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.68% <16.42%> (-0.28%)` | :arrow_down: | | [python3.10](https://app.codecov.io/gh/gwpy/gwsumm/pull/389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.68% <16.42%> (-0.28%)` | :arrow_down: | | [python3.11](https://app.codecov.io/gh/gwpy/gwsumm/pull/389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.68% <16.42%> (-0.28%)` | :arrow_down: | | [python3.9](https://app.codecov.io/gh/gwpy/gwsumm/pull/389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gwpy) | `49.68% <16.42%> (-0.28%)` | :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.

iaraota commented 7 months ago

@eagoetz here are the O4a.3 and "O4a.4" with the modifications implemented in #392. You can see that the percentages of H1L1:double and H1L1V1:double are consistent.

I did not need to add the new ignore_undefined=True option to get_segments(), as this class does not compute the "No segments" percentage.

iaraota commented 7 months ago

@iaraota check why X1:DMT-ANALYSIS_READY:1 are showing 100%.

iaraota commented 7 months ago

@eagoetz here are the updated versions with the fixed percentages in the segments:

O4a: https://ldas-jobs.ligo.caltech.edu/~iara.ota/summary/gps/1368975618-1389456018/segments/ O4a.3: https://ldas-jobs.ligo.caltech.edu/~iara.ota/summary/gps/1384873218-1389456018/segments/

iaraota commented 7 months ago

@eagoetz any concerns I missed in this PR?

eagoetz commented 7 months ago

@iaraota Oops, I missed that you should add the new class to gwsumm/plot/__init__.py

iaraota commented 7 months ago

@eagoetz thank you for noticing! I updated it.