Skip to content

Commit

Permalink
added check to ignore empty ldac catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
mommermi committed Nov 21, 2018
1 parent 44c6ad1 commit 14c3a5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pp_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,13 @@ def calibrate(filenames, minstars, manfilter, manualcatalog,
exptime_keyword=obsparam['exptime'],
time_keyword='MIDTIMJD')

catalogs.append(cat)
if cat.shape[0] > 0:
catalogs.append(cat)
else:
logging.warning(('catalog {:s} is empty; '
'ignore').format(ldac_filename))
if display:
print('catalog {:s} is empty; ignore'.format(ldac_filename))

# derive center and radius of field of view of all images
ra_deg, dec_deg, rad_deg = skycenter(catalogs)
Expand Down

0 comments on commit 14c3a5e

Please sign in to comment.