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

PyGRB: Propagating slide_id information across postprocessing plotting scripts #4809

Merged
merged 39 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c35e331
Update pygrb_plotting_utils.py
sebastiangomezlopez Jul 2, 2024
6acfa6c
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 2, 2024
2550c13
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 2, 2024
4908130
Update pycbc_pygrb_plot_chisq_veto
sebastiangomezlopez Jul 2, 2024
45b13c2
Update pycbc_pygrb_plot_coh_ifosnr
sebastiangomezlopez Jul 2, 2024
6f7cec5
Update pycbc_pygrb_plot_null_stats
sebastiangomezlopez Jul 2, 2024
5ce9fa3
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 19, 2024
7b50899
Update pycbc_pygrb_plot_chisq_veto
sebastiangomezlopez Jul 19, 2024
152f167
Update pycbc_pygrb_plot_chisq_veto
sebastiangomezlopez Jul 19, 2024
c9acf43
Update pycbc_pygrb_plot_chisq_veto
sebastiangomezlopez Jul 19, 2024
ddfbe09
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 19, 2024
f124f98
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 19, 2024
f81f073
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 19, 2024
ba5544f
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 19, 2024
d43b170
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 19, 2024
b1ca9d4
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 19, 2024
ece6854
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 22, 2024
e46cdcd
Update pygrb_plotting_utils.py
sebastiangomezlopez Jul 22, 2024
0829a26
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 22, 2024
c67a4a6
Update pygrb_plotting_utils.py
sebastiangomezlopez Jul 22, 2024
6554596
Update pygrb_plotting_utils.py
sebastiangomezlopez Jul 22, 2024
cbc36e4
Merge branch 'gwastro:master' into slides_postp
sebastiangomezlopez Jul 22, 2024
25e9726
Propagating slide_id information to some pygrb plotting scripts
sebastiangomezlopez Jul 22, 2024
28c7278
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 22, 2024
bb20dcc
Modification to slides parser. Update to plotting scripts
sebastiangomezlopez Jul 24, 2024
085b1ea
Merge branch 'slides_postp' of github.com:sebastiangomezlopez/pycbc i…
sebastiangomezlopez Jul 24, 2024
5ca8eb8
Merge branch 'gwastro:master' into slides_postp
sebastiangomezlopez Jul 24, 2024
3351184
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 24, 2024
08db76f
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 24, 2024
18ea7b1
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 24, 2024
55a4312
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 25, 2024
368e14a
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 25, 2024
229ca55
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 25, 2024
c991754
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 25, 2024
678da8b
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 25, 2024
a7bfb0f
Update pycbc_pygrb_plot_snr_timeseries
sebastiangomezlopez Jul 25, 2024
bc81979
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 25, 2024
a53fef0
Update pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 25, 2024
2c7c177
Update pycbc/results/pygrb_postprocessing_utils.py
sebastiangomezlopez Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/pygrb/pycbc_pygrb_plot_chisq_veto
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ if ifo and ifo not in ifos:
raise RuntimeError(err_msg)

# Extract trigger data
trig_data = load_data(trig_file, ifos, vetoes, opts, slide_id=0)
trig_data = load_data(trig_file, ifos, vetoes, opts,
slide_id=opts.slide_id)

# Extract (or initialize) injection data
inj_data = load_data(found_missed_file, ifos, vetoes, opts,
Expand Down
2 changes: 1 addition & 1 deletion bin/pygrb/pycbc_pygrb_plot_coh_ifosnr
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ ifos, vetoes = ppu.extract_ifos_and_vetoes(
)

# Extract trigger data
trig_data = load_data(trig_file, ifos, vetoes, opts, slide_id=0)
trig_data = load_data(trig_file, ifos, vetoes, opts, slide_id=opts.slide_id)

# Extract (or initialize) injection data
inj_data = load_data(found_file, ifos, vetoes, opts, injections=True, slide_id=0)
Expand Down
3 changes: 2 additions & 1 deletion bin/pygrb/pycbc_pygrb_plot_null_stats
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ ifos, vetoes = ppu.extract_ifos_and_vetoes(trig_file, opts.veto_files,
opts.veto_category)

# Extract trigger data
trig_data = load_data(trig_file, ifos, vetoes, opts, slide_id=0)
trig_data = load_data(trig_file, ifos, vetoes, opts,
slide_id=opts.slide_id)

# Extract (or initialize) injection data
inj_data = load_data(found_missed_file, ifos, vetoes, opts,
Expand Down
11 changes: 7 additions & 4 deletions bin/pygrb/pycbc_pygrb_plot_snr_timeseries
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def reset_times(data_time, trig_time):
# =============================================================================
parser = ppu.pygrb_initialize_plot_parser(description=__doc__)
parser.add_argument("-t", "--trig-file", action="store",
default=None, required=True,
default=None, required=True,
sebastiangomezlopez marked this conversation as resolved.
Show resolved Hide resolved
help="The location of the trigger file")
parser.add_argument("--found-missed-file",
help="The hdf injection results file", required=False)
Expand Down Expand Up @@ -136,18 +136,21 @@ ifos, vetoes = ppu.extract_ifos_and_vetoes(trig_file, opts.veto_files,
# points to show the impact of the cut, otherwise remove points with
# reweighted SNR below threshold
if snr_type == 'reweighted':
trig_data = load_data(trig_file, ifos, vetoes, slide_id=0)
trig_data = load_data(trig_file, ifos, vetoes,
slide_id=opts.slide_id)
trig_data['network/reweighted_snr'] = \
reweightedsnr_cut(trig_data['network/reweighted_snr'],
opts.newsnr_threshold)
inj_data = load_data(inj_file, ifos, vetoes, injections=True,slide_id=0)
inj_data = load_data(inj_file, ifos, vetoes, injections=True,
slide_id=0)
if inj_data is not None:
inj_data['network/reweighted_snr'] = \
reweightedsnr_cut(inj_data['network/reweighted_snr'],
opts.newsnr_threshold)
else:
trig_data = load_data(trig_file, ifos, vetoes,
rw_snr_threshold=opts.newsnr_threshold, slide_id=0)
rw_snr_threshold=opts.newsnr_threshold,
slide_id=opts.slide_id)
inj_data = load_data(inj_file, ifos, vetoes,
rw_snr_threshold=opts.newsnr_threshold,
injections=True, slide_id=0)
Expand Down
4 changes: 3 additions & 1 deletion pycbc/results/pygrb_postprocessing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ def pygrb_initialize_plot_parser(description=None):
parser.add_argument('--plot-caption', default=None,
help="If provided, use the given string as the plot " +
"caption")

parser.add_argument("--slide-id", default=0, type=int,
help="If None, plotting scripts will use triggers" +
"from all short slides.")
sebastiangomezlopez marked this conversation as resolved.
Show resolved Hide resolved
return parser


Expand Down
Loading