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

Add NetworkDutyBarPlot class #389

Merged
merged 12 commits into from
Feb 8, 2024
Merged

Add NetworkDutyBarPlot class #389

merged 12 commits into from
Feb 8, 2024

Conversation

iaraota
Copy link
Collaborator

@iaraota iaraota commented Nov 30, 2023

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 iaraota requested a review from eagoetz November 30, 2023 17:24
@iaraota iaraota self-assigned this Nov 30, 2023
@iaraota
Copy link
Collaborator Author

iaraota commented Nov 30, 2023

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

Copy link

codecov bot commented Nov 30, 2023

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.

❗ 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 ⚠️
Additional details and impacted files
@@            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 Coverage Δ
Linux 49.68% <16.42%> (-0.28%) ⬇️
python3.10 49.68% <16.42%> (-0.28%) ⬇️
python3.11 49.68% <16.42%> (-0.28%) ⬇️
python3.9 49.68% <16.42%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eagoetz eagoetz added this to the 2.2.1 milestone Jan 25, 2024
@iaraota
Copy link
Collaborator Author

iaraota commented Jan 29, 2024

@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
Copy link
Collaborator Author

iaraota commented Jan 29, 2024

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

@iaraota
Copy link
Collaborator Author

iaraota commented Jan 30, 2024

Co-authored-by: Evan Goetz <32753745+eagoetz@users.noreply.github.com>
@iaraota
Copy link
Collaborator Author

iaraota commented Feb 7, 2024

@eagoetz any concerns I missed in this PR?

Copy link
Collaborator

@eagoetz eagoetz left a comment

Choose a reason for hiding this comment

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

Thanks for your updates! LGTM

@eagoetz eagoetz self-requested a review February 7, 2024 23:33
@eagoetz
Copy link
Collaborator

eagoetz commented Feb 7, 2024

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

@iaraota
Copy link
Collaborator Author

iaraota commented Feb 8, 2024

@eagoetz thank you for noticing! I updated it.

Copy link
Collaborator

@eagoetz eagoetz left a comment

Choose a reason for hiding this comment

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

LGTM

@eagoetz eagoetz merged commit 07e1f43 into gwpy:master Feb 8, 2024
8 checks passed
@iaraota iaraota deleted the segment_bar_plot branch April 23, 2024 20:38
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.

2 participants