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

snapshot...

parent 9a7e9cbf
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,12 @@ gfs_files = GFSfiles('/Users/tomrink/data/contrail/gfs/')
# GEOSNavigation needs to be updated to support GOES-18
# geos_nav = GEOSNavigation()
num_lines = 5424
num_elems = 5424
def load_image(image_path):
# Extract date time string from image path
# Extract date time string from image filepath
datetime_regex = '_\\d{8}_\\d{6}'
datetime_string = re.search(datetime_regex, image_path)
if datetime_string:
......@@ -38,7 +41,7 @@ def load_image(image_path):
def get_contrail_mask_image(image, thresh=0.157):
image = np.where(image > thresh,1, 0)
image = np.where(image > thresh, 1, 0)
return image
......@@ -134,9 +137,9 @@ def extract(mask_image, image_ts, clavrx_path):
levels_dict_image = {}
for k, v in levels_dict_cidx.items():
cidx_nda = np.array(v)
flat_image = np.zeros(5424*5424)
flat_image = np.zeros(num_lines*num_elems)
flat_image[cidx_nda] = 1
levels_dict_image[k] = flat_image.reshape(5424, 5424)
levels_dict_image[k] = flat_image.reshape(num_lines, num_elems)
# Create a DataFrame for all tuples
all_df = pd.DataFrame(all_list,
......
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