Skip to content

Commit

Permalink
Fix forecasting bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
schlafly committed Dec 21, 2022
1 parent 6871b8c commit 7cb17ed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions py/desisurvey/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ def forecast_plots(tmain=None, exps=None, surveyopsdir=None,
doneetimefracdict[name] = np.cumsum((doneetime*mask)[s])
doneetimefracdict[name] /= np.sum(costetime*include*mask)
colors = dict(bright='tab:orange', dark='black', overall='tab:blue')
maxind = np.max(np.flatnonzero(countdone[s] > 0))
maxind = np.max(np.flatnonzero((countdone[s] > 0) &
(tmain['PROGRAM'][s] != 'BACKUP')))
for label, mask in doneetimefracdict.items():
p.plot(nightind[s[:maxind+1]], doneetimefracdict[label][:maxind+1]*100,
label=f'% {label} done',
Expand Down Expand Up @@ -426,8 +427,10 @@ def summarize_daterange(
for p in programtime:
print(f'{p:8s} {programtile[p]:7.1f} '
f'{100*programtime[p]/totprogramtime[p]:5.2f}% '
f'(naive sum(efftime_etc): '
f'{100*programetcefftime[p]/totprogramtime[p]:5.2f}%)')
)
# f'(naive sum(efftime_etc): '
# f'{100*programetcefftime[p]/totprogramtime[p]:5.2f}%)'


def surveysim_exps_to_exps_and_tmain(expsfn, tmain, maxnight=None):
from astropy.io import fits
Expand Down

0 comments on commit 7cb17ed

Please sign in to comment.