Skip to content
Snippets Groups Projects
Commit edab8f40 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent bdd173c2
No related branches found
No related tags found
No related merge requests found
...@@ -1099,6 +1099,8 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output ...@@ -1099,6 +1099,8 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
alt_hi = flt_level_ranges[flight_levels[-1]][1] alt_hi = flt_level_ranges[flight_levels[-1]][1]
else: else:
flight_levels = [0] flight_levels = [0]
if use_max_cth_level:
flight_levels = [-1]
if pirep_file is not None: if pirep_file is not None:
ice_dict, no_ice_dict, neg_ice_dict = setup(pirep_file) ice_dict, no_ice_dict, neg_ice_dict = setup(pirep_file)
...@@ -1189,21 +1191,24 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output ...@@ -1189,21 +1191,24 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
if (day_night == 'AUTO' or day_night == 'DAY') and num_day_tiles > 0: if (day_night == 'AUTO' or day_night == 'DAY') and num_day_tiles > 0:
day_data_dct = {name: [] for name in day_train_params} # day_data_dct = {name: [] for name in day_train_params}
for name in day_train_params: # for name in day_train_params:
for k in day_idxs: # for k in day_idxs:
day_data_dct[name].append(data_dct[name][k]) # day_data_dct[name].append(data_dct[name][k])
# day_grd_dct = {name: None for name in day_train_params}
# for ds_name in day_train_params:
# day_grd_dct[ds_name] = np.stack(day_data_dct[ds_name])
day_idxs = np.array(day_idxs)
day_grd_dct = {name: None for name in day_train_params} day_grd_dct = {name: None for name in day_train_params}
for ds_name in day_train_params: for name in day_train_params:
day_grd_dct[ds_name] = np.stack(day_data_dct[ds_name]) day_grd_dct[name] = data_dct[name][day_idxs,]
if use_max_cth_level: if use_max_cth_level:
day_grd_dct['cth_high_avg'] = day_cth_max day_grd_dct['cth_high_avg'] = day_cth_max
preds_day_dct, probs_day_dct = \ preds_day_dct, probs_day_dct = \
model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, prob_thresh=prob_thresh, model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude, flight_levels=flight_levels)
flight_levels=flight_levels,
use_max_cth_level=use_max_cth_level)
day_idxs = np.array(day_idxs) day_idxs = np.array(day_idxs)
for flvl in flight_levels: for flvl in flight_levels:
...@@ -1216,21 +1221,25 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output ...@@ -1216,21 +1221,25 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
if (day_night == 'AUTO' or day_night == 'NIGHT') and num_nght_tiles > 0: if (day_night == 'AUTO' or day_night == 'NIGHT') and num_nght_tiles > 0:
nght_data_dct = {name: [] for name in nght_train_params} # nght_data_dct = {name: [] for name in nght_train_params}
for name in nght_train_params: # for name in nght_train_params:
for k in nght_idxs: # for k in nght_idxs:
nght_data_dct[name].append(data_dct[name][k]) # nght_data_dct[name].append(data_dct[name][k])
# nght_grd_dct = {name: None for name in nght_train_params}
# for ds_name in nght_train_params:
# nght_grd_dct[ds_name] = np.stack(nght_data_dct[ds_name])
nght_idxs = np.array(nght_idxs)
nght_grd_dct = {name: None for name in nght_train_params} nght_grd_dct = {name: None for name in nght_train_params}
for ds_name in nght_train_params: for name in nght_train_params:
nght_grd_dct[ds_name] = np.stack(nght_data_dct[ds_name]) nght_grd_dct[name] = data_dct[name][nght_idxs,]
if use_max_cth_level: if use_max_cth_level:
nght_grd_dct['cth_high_avg'] = nght_cth_max nght_grd_dct['cth_high_avg'] = nght_cth_max
preds_nght_dct, probs_nght_dct = \ preds_nght_dct, probs_nght_dct = \
model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, prob_thresh=prob_thresh, model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude, flight_levels=flight_levels)
flight_levels=flight_levels,
use_max_cth_level=use_max_cth_level)
nght_idxs = np.array(nght_idxs) nght_idxs = np.array(nght_idxs)
for flvl in flight_levels: for flvl in flight_levels:
nght_preds = preds_nght_dct[flvl] nght_preds = preds_nght_dct[flvl]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment