Skip to content

Commit abb1c6e

Browse files
committed
Update readfibermaps.py
Fixed bug when no fibers are assigned to targets
1 parent 289fe7e commit abb1c6e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/boss_drp/prep/readfibermaps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,8 @@ def get_mags_astrom(search_table, db = True, fps=False, fast=False, release='sds
13751375

13761376
if db is True:
13771377
splog.info('Getting Magnitudes, IDs, and Astrometry from SDSSDB')
1378+
if len(search_table[search_table['icatalogid']!= -999]) == 0:
1379+
return(search_table)
13781380
u_s_table = search_table[search_table['icatalogid']!= -999].group_by('icatalogid')
13791381
u_s_table = u_s_table[u_s_table.groups.indices[:-1]]
13801382
catalogids = np.unique(search_table['icatalogid'].data).tolist()

0 commit comments

Comments
 (0)