Skip to content
Snippets Groups Projects
Commit 297fe9d1 authored by Coda Phillips's avatar Coda Phillips
Browse files

Update qc_day to show sum of qc variables

parent e738d633
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,10 @@ def qc_day(qc_path): ...@@ -29,7 +29,10 @@ def qc_day(qc_path):
cxs = get_all_housekeeping(cxs_path) cxs = get_all_housekeeping(cxs_path)
frame = cxs.combine_first(get_all_housekeeping(sum_path)) frame = cxs.combine_first(get_all_housekeeping(sum_path))
frame = frame.combine_first(get_qc_frame(qc_path)) qc_frame = get_qc_frame(qc_path)
frame = frame.combine_first(qc_frame)
qc_frame_sum = qc_frame.sum(axis=0).to_string()
plots = [] plots = []
...@@ -45,7 +48,7 @@ def qc_day(qc_path): ...@@ -45,7 +48,7 @@ def qc_day(qc_path):
if plot is not None: if plot is not None:
plots.append(plot) plots.append(plot)
return flask.render_template('qc.html', qc_path=qc_path, plots=plots) return flask.render_template('qc.html', qc_path=qc_path, plots=plots, qc_frame=qc_frame_sum)
def save_plot(filename): def save_plot(filename):
print('saving {}'.format(filename)) print('saving {}'.format(filename))
...@@ -54,6 +57,7 @@ def save_plot(filename): ...@@ -54,6 +57,7 @@ def save_plot(filename):
def plot_variable_qc(frame, loc, filename=None): def plot_variable_qc(frame, loc, filename=None):
qc_loc = 'qc_' + loc qc_loc = 'qc_' + loc
if qc_loc not in frame.columns: if qc_loc not in frame.columns:
print('{qc_loc} not in frame'.format(qc_loc=qc_loc))
return return
if sum(frame[qc_loc]) > 0: if sum(frame[qc_loc]) > 0:
fig = plt.figure(figsize=(50,5)) fig = plt.figure(figsize=(50,5))
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
</head> </head>
<body> <body>
<h1>{{qc_path}}</h1> <h1>{{qc_path}}</h1>
<pre>{{qc_frame}}</pre>
{% for plot in plots %} {% for plot in plots %}
{{plot|safe}} {{plot|safe}}
{% endfor %} {% endfor %}
......
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