Skip to content

Commit

Permalink
Consistent use of logger
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirkby committed Nov 16, 2018
1 parent ac775bb commit 0dc8b2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions py/desisurvey/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ def fiberassign(self, night, completed):
.format(np.count_nonzero(run_now), np.count_nonzero(delayed), night))

def afternoon_plan(self, night, completed):
self.log.debug('Starting afternoon planning for {} with {} / {} tiles completed.'
.format(night, np.count_nonzero(completed), self.tiles.ntiles))
if self.first_night is None:
# Remember the first night of the survey.
self.first_night = night
Expand Down
5 changes: 4 additions & 1 deletion py/desisurvey/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ def update_tiles(self, tile_available, tile_priority):

if not np.any(self.tile_available & self.tile_planned):
raise ValueError('No available tiles with priority > 0 to schedule.')
return np.where(new_available)[0], np.where(new_planned)[0]
new_available, new_planned = np.where(new_available)[0], np.where(new_planned)[0]
self.log.debug('{} new available tiles, {} new planned tiles.'.format(
len(new_available), len(new_planned)))
return new_available, new_planned

def init_night(self, night, use_twilight=False):
"""Initialize scheduling for the specified night.
Expand Down

0 comments on commit 0dc8b2d

Please sign in to comment.