Commit c891d4b5 authored by Jeff Piollé's avatar Jeff Piollé

fixed some missing matchups and static sites

parent 7e1642ee
......@@ -674,8 +674,7 @@ class SourceFile(object):
# for s in sites}
for site, points in self._dynamic_sites[collection_id].items():
if u'tsyy9904793' == site:
pass
# For each valid site, build a shape of the maximum extent
# of the trajectory taking into account the changing
# colocation length with latitude
......@@ -750,16 +749,17 @@ class SourceFile(object):
for collection, sites in self.site_collections[group].items():
result = {}
for code, shape in sites.items():
if self.args.only_sites is not None:
if code not in self.args.only_sites:
continue
if boundary_shape.use_adjusted or shape.use_adjusted:
if not boundary_shape.adjusted_shape.disjoint(
shape.adjusted_shape):
result[code] = shape
else:
if not boundary_shape.disjoint(shape):
result[code] = shape
#if boundary_shape.use_adjusted or shape.use_adjusted:
# if not boundary_shape.adjusted_shape.disjoint(
# shape.adjusted_shape):
# result[code] = shape
#else:
if not boundary_shape.disjoint(shape):
result[code] = shape
if result == {}:
continue
revised_collection[collection] = result
......@@ -892,6 +892,7 @@ class SourceFile(object):
#For each site, establish a list of data ranges
for code, shapes in sites.items():
for shape_index, shape in enumerate(shapes):
# Poor quality in situ data may give data at
# impossible locations as a simple test, we ignore any
......
......@@ -160,22 +160,28 @@ def slicer(
#Bail out if no pixels are in the site.
return None
# Get the x and y slices
y_slice = find_objects(y_labels)[0][0]
x_slice = find_objects(x_labels)[0][0]
# Get the return values
returned_slice = (x_slice, y_slice)
returned_mask = mask[returned_slice]
if returned_mask.all():
returned_coverage = 100.0
else:
returned_coverage = get_coverage(
full_lat[returned_slice][returned_mask],
full_lon[returned_slice][returned_mask],
shape)
if returned_coverage is None:
return None
for x in range(x_count):
for y in range(y_count):
# Get the x and y slices
y_slice = find_objects(y_labels)[y][0]
x_slice = find_objects(x_labels)[x][0]
# Get the return values
returned_slice = (x_slice, y_slice)
returned_mask = mask[returned_slice]
if returned_mask.all():
returned_coverage = 100.0
else:
returned_coverage = get_coverage(
full_lat[returned_slice][returned_mask],
full_lon[returned_slice][returned_mask],
shape)
if returned_coverage is not None:
break
if returned_coverage is not None:
break
if returned_coverage is None:
return
returned_slices = [returned_slice]
returned_masks = [returned_mask]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment