From 73ab2554327a9777a061d3e9b8657671a6cfa54c Mon Sep 17 00:00:00 2001 From: Coda Phillips <cphillips@sean.ssec.wisc.edu> Date: Wed, 27 Jul 2016 11:51:34 -0500 Subject: [PATCH] Rename output files --- interpret_qc.py | 10 ++++++---- main.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/interpret_qc.py b/interpret_qc.py index 890e06e..a08811c 100644 --- a/interpret_qc.py +++ b/interpret_qc.py @@ -1,6 +1,8 @@ import netCDF4 import pandas as pd import numpy as np +import matplotlib +matplotlib.use('agg') import matplotlib.pyplot as plt import mpld3 from aeri_tools.io.dmv.housekeeping import get_all_housekeeping @@ -17,15 +19,15 @@ global_ftp_dir = None @app.route('/') def index(): - ae_dirs = glob(os.path.join(global_ftp_dir, 'AE*/*.qc')) + ae_dirs = glob(os.path.join(global_ftp_dir, 'AE*/*QC.nc')) ae_dirs = [a.lstrip('/') for a in ae_dirs] return flask.render_template('index.html', ae_dirs=ae_dirs) @app.route('/qc/<path:qc_path>') def qc_day(qc_path): qc_path = '/'+qc_path - cxs_path = qc_path.replace('.qc','B1.CXS') - sum_path = qc_path.replace('.qc','.SUM') + cxs_path = qc_path.replace('QC.nc','B1.CXS') + sum_path = qc_path.replace('QC.nc','.SUM') cxs = get_all_housekeeping(cxs_path) frame = cxs.combine_first(get_all_housekeeping(sum_path)) @@ -114,5 +116,5 @@ if __name__ == '__main__': generate_all_plots(os.path.abspath(args.ftp)) else: global_ftp_dir = os.path.abspath(args.ftp) - app.run(debug=True) + app.run('0.0.0.0', debug=True) diff --git a/main.py b/main.py index dda9329..2e79fe9 100644 --- a/main.py +++ b/main.py @@ -75,7 +75,7 @@ def update_all(ftp_dir, parameters=None): def files_to_update(cxs_files, update_only=True): for cxs_file in cxs_files: possible_sum = os.path.join(os.path.dirname(cxs_file), cxs_file.replace('B1.CXS','.SUM')) - possible_qc = os.path.join(os.path.dirname(cxs_file), cxs_file.replace('B1.CXS','.qc')) + possible_qc = os.path.join(os.path.dirname(cxs_file), cxs_file.replace('B1.CXS','QC.nc')) if os.path.isfile(possible_sum): sum_file = possible_sum -- GitLab