diff --git a/modules/deeplearning/icing_fcn.py b/modules/deeplearning/icing_fcn.py index 122a6842ee7ac38bb11fb3728764b73fa94deefd..c993b650d995b80d9e5f69be21ef1b98fae7d8a8 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')