Skip to content

Commit

Permalink
eliminatiing peakmjd plot if unrealistic
Browse files Browse the repository at this point in the history
  • Loading branch information
anaismoller committed Jul 1, 2019
1 parent f4100f3 commit 87a3edd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions supernnova/visualization/early_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def plot_predictions(
else:
ax.set_title(SNtype + f" (ID: {SNID}, redshift: {redshift:.3g})")
# Add PEAKMJD
ax.plot([peak_MJD, peak_MJD], ylim, "k--", label="Peak MJD")
if OOD is None and not settings.data_testing and arr_time.min()<peak_MJD and peak_MJD>arr_time.max():
ax.plot([peak_MJD, peak_MJD], ylim, "k--", label="Peak MJD")

# Plot the classifications
ax = plt.subplot(gs[1])
Expand Down Expand Up @@ -147,7 +148,7 @@ def plot_predictions(
ax.set_xlabel("Time (MJD)")
ax.set_ylabel("classification probability")
# Add PEAKMJD
if OOD is None and not settings.data_testing:
if OOD is None and not settings.data_testing and arr_time.min()<peak_MJD and peak_MJD>arr_time.max():
ax.plot([peak_MJD, peak_MJD], [0, 1], "k--", label="Peak MJD")
ax.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.0)

Expand Down

0 comments on commit 87a3edd

Please sign in to comment.