From dd7aa1010c894e377f4116c3d0256509f1382f11 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 24 Oct 2023 12:50:16 -0500 Subject: [PATCH] snapshot... --- modules/deeplearning/icing_fcn.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/deeplearning/icing_fcn.py b/modules/deeplearning/icing_fcn.py index 122a6842..c993b650 100644 --- a/modules/deeplearning/icing_fcn.py +++ b/modules/deeplearning/icing_fcn.py @@ -1213,6 +1213,26 @@ def run_evaluate_static(data_dct, num_tiles, ckpt_dir_s_path, day_night='DAY', l return preds_dct, probs_dct +def run_evaluate_static_2(model, data_dct, num_tiles, day_night='DAY', l1b_or_l2='both', satellite='GOES16', + prob_thresh=0.5, flight_levels=[0, 1, 2, 3, 4], use_flight_altitude=False): + + if not use_flight_altitude: + flight_levels = [0] + + probs_dct = {flvl: None for flvl in flight_levels} + preds_dct = {flvl: None for flvl in flight_levels} + + for flvl in flight_levels: + model.flight_level = flvl + model.setup_eval_pipeline(data_dct, num_tiles) + model.do_evaluate(prob_thresh=prob_thresh) + + probs_dct[flvl] = nn.test_probs.flatten() + preds_dct[flvl] = nn.test_preds.flatten() + + return preds_dct, probs_dct + + if __name__ == "__main__": nn = IcingIntensityFCN() nn.run('matchup_filename') -- GitLab