From 57c655c6e634c61a243930f8f09a3e9249ac93db Mon Sep 17 00:00:00 2001 From: Stephen Bailey Date: Wed, 11 Sep 2024 10:38:56 -0700 Subject: [PATCH] fix missing zall TSNR2 columns --- py/desispec/zcatalog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/desispec/zcatalog.py b/py/desispec/zcatalog.py index eff632db0..29cb51f78 100644 --- a/py/desispec/zcatalog.py +++ b/py/desispec/zcatalog.py @@ -456,10 +456,10 @@ def update_table_columns(table, specgroup = 'zpix', all_columns = True, columns_ ## Last column in TSNR2_LRG in all the redshift catalogs ## We will add the PRIMARY columns in the end - ## The indices of NUMOBS_INIT, PLATE_RA, and ZCAT_PRIMARY columns + ## The indices of NUMOBS_INIT, PLATE_RA, and last TSNR2_* columns nobs = np.where(np.array(tab.colnames) == 'NUMOBS_INIT')[0][0] pra = np.where(np.array(tab.colnames) == 'PLATE_RA')[0][0] - tsnr = np.where(np.array(tab.colnames) == 'TSNR2_LRG')[0][0] + tsnr = np.where(np.char.startswith(np.array(tab.colnames), 'TSNR2_'))[0][-1] ## List of all columns all_cols = tab.colnames