From 26d6ec7b2ffcaf72631f9c4f3b0d7b815c21d8e6 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Tue, 10 Sep 2024 11:49:11 +0100 Subject: [PATCH] fix logical, but likely harmless indexing bug --- bin/desi_tsnr_afterburner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/desi_tsnr_afterburner b/bin/desi_tsnr_afterburner index 26d7e85cf..0f199e7a8 100755 --- a/bin/desi_tsnr_afterburner +++ b/bin/desi_tsnr_afterburner @@ -494,7 +494,7 @@ def compute_summary_tables(summary_rows, preexisting_tsnr2_expid_table, # EFFTIME SPEC FOR GOALTYPE backup determined by TSNR2_GPBBACKUP. # If no 'GPB_EFFTIME_BACKUP' then default to the BGS time ii = (exp_summary['GOALTYPE']=='backup') - if 'GPB_EFFTIME_BACKUP' in exp_summary.dtype.names and len(ii) > 0 and np.any(exp_summary['EFFTIME_SPEC'][ii]>0.): + if 'GPB_EFFTIME_BACKUP' in exp_summary.dtype.names and np.any(ii) and np.any(exp_summary['EFFTIME_SPEC'][ii]>0.): exp_summary['EFFTIME_SPEC'][ii] = exp_summary['GPB_EFFTIME_BACKUP'][ii] else: exp_summary['EFFTIME_SPEC'][ii] = exp_summary['BGS_EFFTIME_BRIGHT'][ii]