Skip to content

Commit

Permalink
Bug fix in Waveform_Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
geojunky committed Oct 29, 2024
1 parent b0cc57f commit ad4daee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions seismic/ASDFdatabase/waveform_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ def process_results(self, output_fn):
# end if

# compute total coverage fraction
total_coverage_fraction = total_coverage * 86400 / \
(self.et_list[-1] - self.st_list[0])
total_coverage_fraction = total_coverage / float(spec_count)

# compute health for summary plot
health = (((1 - mean_deviation) + total_coverage_fraction) / 2.) * 100
Expand Down Expand Up @@ -516,7 +515,8 @@ def add_image(ax, img):
# generate grids of daily plots
nrows = 11
ncols = 4
nplots = (self.et_list[-1] - self.st_list[0]) / 86400
nplots = np.sum([len(img) > 0 for _, img in png_dict.items()])
sorted_keys = sorted(list(png_dict.keys()))
plots_per_page = nrows * ncols

done = False
Expand All @@ -543,9 +543,8 @@ def add_image(ax, img):

ax = axes[irow, icol]

key = self.st_list[iplot].timestamp
img = png_dict[key]
if (img is not None):
img = png_dict[sorted_keys[iplot]]
if (len(img) > 0):
add_image(ax, img)
# end if
# end for
Expand Down

0 comments on commit ad4daee

Please sign in to comment.