Skip to content

Commit

Permalink
drop NUMEXP, NUMTILE columns
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Nov 6, 2024
1 parent e90de23 commit 46a2721
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion py/desispec/scripts/zcatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import multiprocessing as mp

import numpy as np
from numpy.lib.recfunctions import append_fields
from numpy.lib.recfunctions import append_fields, drop_fields

import fitsio
from astropy.table import Table, hstack, vstack
Expand Down Expand Up @@ -131,6 +131,15 @@ def read_redrock(rrfile, group=None, recoadd_fibermap=False, minimal=False, pert
redshifts = fx['ZBEST'].read()
zbest_file = True

#
# These old columns show up in zbest files. They have been replaced with
# COADD_NUMEXP, COADD_NUMTILE, which are obtained from coadd_fibermapp()
# for zbest files.
#
for drop_column in ('NUMEXP', 'NUMTILE'):
if drop_column in redshifts.dtype.names:
redshifts = drop_fields(redshifts, drop_column, usemask=False, asrecarray=False)

if recoadd_fibermap or zbest_file:
if zbest_file:
spectra_filename = checkgzip(replace_prefix(rrfile, 'zbest', 'spectra'))
Expand Down

0 comments on commit 46a2721

Please sign in to comment.