From dbdb99e442078d18c299d641312e8ea7504f25ec Mon Sep 17 00:00:00 2001 From: Arthur Tolley <32394213+ArthurTolley@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:27:26 +0100 Subject: [PATCH] [pycbc live] Don't add snr options to command if they don't exist (#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 --- bin/pycbc_live | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/pycbc_live b/bin/pycbc_live index 3dfdbe93d13..9089199529b 100755 --- a/bin/pycbc_live +++ b/bin/pycbc_live @@ -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']: @@ -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 '