Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aeri_quality_control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aeri
aeri_quality_control
Commits
73ab2554
Commit
73ab2554
authored
8 years ago
by
Coda Phillips
Browse files
Options
Downloads
Patches
Plain Diff
Rename output files
parent
ecc6d8f5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interpret_qc.py
+6
-4
6 additions, 4 deletions
interpret_qc.py
main.py
+1
-1
1 addition, 1 deletion
main.py
with
7 additions
and
5 deletions
interpret_qc.py
+
6
−
4
View file @
73ab2554
import
netCDF4
import
netCDF4
import
pandas
as
pd
import
pandas
as
pd
import
numpy
as
np
import
numpy
as
np
import
matplotlib
matplotlib
.
use
(
'
agg
'
)
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
mpld3
import
mpld3
from
aeri_tools.io.dmv.housekeeping
import
get_all_housekeeping
from
aeri_tools.io.dmv.housekeeping
import
get_all_housekeeping
...
@@ -17,15 +19,15 @@ global_ftp_dir = None
...
@@ -17,15 +19,15 @@ global_ftp_dir = None
@app.route
(
'
/
'
)
@app.route
(
'
/
'
)
def
index
():
def
index
():
ae_dirs
=
glob
(
os
.
path
.
join
(
global_ftp_dir
,
'
AE*/*
.q
c
'
))
ae_dirs
=
glob
(
os
.
path
.
join
(
global_ftp_dir
,
'
AE*/*
QC.n
c
'
))
ae_dirs
=
[
a
.
lstrip
(
'
/
'
)
for
a
in
ae_dirs
]
ae_dirs
=
[
a
.
lstrip
(
'
/
'
)
for
a
in
ae_dirs
]
return
flask
.
render_template
(
'
index.html
'
,
ae_dirs
=
ae_dirs
)
return
flask
.
render_template
(
'
index.html
'
,
ae_dirs
=
ae_dirs
)
@app.route
(
'
/qc/<path:qc_path>
'
)
@app.route
(
'
/qc/<path:qc_path>
'
)
def
qc_day
(
qc_path
):
def
qc_day
(
qc_path
):
qc_path
=
'
/
'
+
qc_path
qc_path
=
'
/
'
+
qc_path
cxs_path
=
qc_path
.
replace
(
'
.q
c
'
,
'
B1.CXS
'
)
cxs_path
=
qc_path
.
replace
(
'
QC.n
c
'
,
'
B1.CXS
'
)
sum_path
=
qc_path
.
replace
(
'
.q
c
'
,
'
.SUM
'
)
sum_path
=
qc_path
.
replace
(
'
QC.n
c
'
,
'
.SUM
'
)
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
))
...
@@ -114,5 +116,5 @@ if __name__ == '__main__':
...
@@ -114,5 +116,5 @@ if __name__ == '__main__':
generate_all_plots
(
os
.
path
.
abspath
(
args
.
ftp
))
generate_all_plots
(
os
.
path
.
abspath
(
args
.
ftp
))
else
:
else
:
global_ftp_dir
=
os
.
path
.
abspath
(
args
.
ftp
)
global_ftp_dir
=
os
.
path
.
abspath
(
args
.
ftp
)
app
.
run
(
debug
=
True
)
app
.
run
(
'
0.0.0.0
'
,
debug
=
True
)
This diff is collapsed.
Click to expand it.
main.py
+
1
−
1
View file @
73ab2554
...
@@ -75,7 +75,7 @@ def update_all(ftp_dir, parameters=None):
...
@@ -75,7 +75,7 @@ def update_all(ftp_dir, parameters=None):
def
files_to_update
(
cxs_files
,
update_only
=
True
):
def
files_to_update
(
cxs_files
,
update_only
=
True
):
for
cxs_file
in
cxs_files
:
for
cxs_file
in
cxs_files
:
possible_sum
=
os
.
path
.
join
(
os
.
path
.
dirname
(
cxs_file
),
cxs_file
.
replace
(
'
B1.CXS
'
,
'
.SUM
'
))
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
'
,
'
.q
c
'
))
possible_qc
=
os
.
path
.
join
(
os
.
path
.
dirname
(
cxs_file
),
cxs_file
.
replace
(
'
B1.CXS
'
,
'
QC.n
c
'
))
if
os
.
path
.
isfile
(
possible_sum
):
if
os
.
path
.
isfile
(
possible_sum
):
sum_file
=
possible_sum
sum_file
=
possible_sum
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment