Skip to content

Commit

Permalink
fix another index
Browse files Browse the repository at this point in the history
weaverba137 committed Nov 19, 2024
1 parent 9f260e0 commit 1019325
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/desispec/scripts/zcatalog.py
Original file line number Diff line number Diff line change
@@ -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':

0 comments on commit 1019325

Please sign in to comment.