Skip to content

Commit

Permalink
Changing where we raised the warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleyna Akyuz authored and Aleyna Akyuz committed Dec 3, 2024
1 parent 041599c commit 20e7fc8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions pycbc/inject/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ def apply(self, strain, detector_name, f_lower=None, distance_scale=1,
# safety buffer
start_time = inj.tc - 2 * (inj_length + 1)
if end_time < t0 or start_time > t1:
logger.warning("No injections applied.")
continue
signal = self.make_strain_from_inj_object(inj, delta_t,
detector_name, f_lower=f_l,
Expand Down
2 changes: 0 additions & 2 deletions pycbc/strain/strain.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ def from_cli(opt, dyn_range_fac=1, precision='single',
distance_scale=opt.injection_scale_factor,
injection_sample_rate=opt.injection_sample_rate,
inj_filter_rejector=inj_filter_rejector)
else:
logger.warning("No injections applied.")

if opt.sgburst_injection_file:
logger.info("Applying sine-Gaussian burst injections")
Expand Down

0 comments on commit 20e7fc8

Please sign in to comment.