From 1019325e0d5d6a1a613c8dfd35eb8fbe452931b8 Mon Sep 17 00:00:00 2001 From: Benjamin Alan Weaver Date: Tue, 19 Nov 2024 14:43:48 -0700 Subject: [PATCH] fix another index --- py/desispec/scripts/zcatalog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/desispec/scripts/zcatalog.py b/py/desispec/scripts/zcatalog.py index 9e3a310fa..df95b1c2d 100755 --- a/py/desispec/scripts/zcatalog.py +++ b/py/desispec/scripts/zcatalog.py @@ -275,7 +275,10 @@ def read_redrock(rrfile, group=None, recoadd_fibermap=False, minimal=False, pert expfibermap.add_column(np.zeros((len(expfibermap), ), dtype=np.float64), index=i, name=add_col) if add_col == 'PLATE_RA': - i = expfibermap.colnames.index('SCND_TARGET') + try: + i = expfibermap.colnames.index('SCND_TARGET') + except ValueError: + i = expfibermap.colnames.index('MWS_TARGET') expfibermap.add_column(expfibermap['TARGET_RA'], index=i, name=add_col) if add_col == 'PLATE_DEC':