From 22486559a22204f7b9a6e3cfa98d3e1428fadcc8 Mon Sep 17 00:00:00 2001 From: anaismoller Date: Wed, 19 Oct 2022 15:24:17 +1100 Subject: [PATCH] plot_lcs exception 1 point + peak --- supernnova/visualization/early_prediction.py | 111 ++++++++++--------- 1 file changed, 59 insertions(+), 52 deletions(-) diff --git a/supernnova/visualization/early_prediction.py b/supernnova/visualization/early_prediction.py index 53c4367..3e23c26 100644 --- a/supernnova/visualization/early_prediction.py +++ b/supernnova/visualization/early_prediction.py @@ -159,7 +159,7 @@ def plot_predictions( OOD is None and not settings.data_testing and arr_time.min() < peak_MJD - and peak_MJD > arr_time.max() + 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) @@ -283,60 +283,67 @@ def make_early_prediction(settings, nb_lcs=1, do_gifs=False): settings, dict_rnn, X, target, OOD=OOD ) # X here has been normalized. We unnormalize X - X_unnormed = tu.unnormalize_arr(X_normed, settings) - # Check we do recover X_ori when OOD is None - if OOD is None and "cosmo" not in settings.norm: - # check if normalization converges - # using clipping in case of min