Skip to content

Commit

Permalink
[pycbc live] Don't add snr options to command if they don't exist (gw…
Browse files Browse the repository at this point in the history
…astro#4518)

* Don't run snr optimizer setup if not optimizing snr

* moving the check to a more appropraite place

* setting snr_opt_options to None if not optimizing
  • Loading branch information
ArthurTolley authored and titodalcanton committed Jan 19, 2024
1 parent 19e20fe commit dbdb99e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/pycbc_live
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ class LiveEventManager(object):
self.fu_cores = 1
# Convert SNR optimizer options into a string
self.snr_opt_options = snr_optimizer.args_to_string(args)
else:
self.snr_opt_options = None

if args.enable_embright_has_massgap:
if args.embright_massgap_max < self.mc_area_args['mass_bdary']['ns_max']:
Expand Down Expand Up @@ -327,7 +329,8 @@ class LiveEventManager(object):
cmd += exepath + ' '

# Add SNR optimization options to the command
cmd += self.snr_opt_options
if self.snr_opt_options is not None:
cmd += self.snr_opt_options

# Add data files according to the event we are optimizing
data_fils_str = '--data-files '
Expand Down

0 comments on commit dbdb99e

Please sign in to comment.