Skip to content
Snippets Groups Projects
Commit 7bd3e084 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

final tweaks to get no categories working

parent 1a5b6b79
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,7 @@ ALL_SET_KEY = "all-time"
MORNING_SET_KEY = "morning-time"
AFTERNOON_SET_KEY = "afternoon-time"
EVENING_SET_KEY = "evening-time"
ALL_TIMES_KEY = "all-time"
TIME_SETS = {#DAY_SET_KEY, # not currently in use
NIGHT_SET_KEY,
#ALL_SET_KEY, # not currently in use
......
......@@ -250,7 +250,7 @@ def make_combined_masks (aux_data, list_of_mask_combinations) :
# if this mask is the no categories mask, then override and just use all the data
if mask_name == NO_CATEGORIES :
temp_mask = numpy.copy(simplified_mask_index[NO_CATEGORIES].copy())
temp_mask = simplified_mask_index[NO_CATEGORIES] & simplified_mask_index[ALL_TIMES_KEY]
else :
# add to the combined mask
......@@ -268,8 +268,12 @@ def make_combined_masks (aux_data, list_of_mask_combinations) :
else :
temp_nobs_mask = temp_nobs_mask & simplified_mask_index[mask_name]
# if we had no time masks to get nobs from, assume we're using all the possible observations
if temp_nobs_mask is None :
temp_nobs_mask = simplified_mask_index[ALL_TIMES_KEY]
# if we were able to build the combined mask, save it
if temp_mask is not None and temp_nobs_mask is not None :
if temp_mask is not None :
combined_masks[mask_combination] = temp_mask
nobs_masks [mask_combination] = temp_nobs_mask
......
......@@ -182,6 +182,10 @@ def generate_time_area_masks (file_path,
# or
# Morning + Afternoon = Day
# also make something to record where all the time appropriate data is
time_masks[ALL_TIMES_KEY] = time_masks[EVENING_SET_KEY] | time_masks[NIGHT_SET_KEY] | \
time_masks[MORNING_SET_KEY] | time_masks[AFTERNOON_SET_KEY]
return file_object, scan_line_times, time_masks
def generate_pressure_area_masks (file_path,
......
......@@ -131,7 +131,7 @@ AUX_MASKS_BY_VARIABLE = { # TODO, confirm this with Bryan
CLOUD_HEIGHT_UNCERT_NAME: [TIME_MASKS_KEY, PRESS_MASKS_KEY, THICK_MASKS_KEY],
CLOUD_PRESS_UNCERT_NAME: [TIME_MASKS_KEY, PRESS_MASKS_KEY, THICK_MASKS_KEY],
CLOUD_TEMP_UNCERT_NAME: [TIME_MASKS_KEY, PRESS_MASKS_KEY, THICK_MASKS_KEY],
COST_FN_ACHA_NAME: [PRESS_MASKS_KEY, NO_CATEGORIES],
COST_FN_ACHA_NAME: [NO_CATEGORIES,],
}
def is_VIIRS_file (file_name_string) :
......
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