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
d64fba0e
Commit
d64fba0e
authored
8 years ago
by
Coda Phillips
Browse files
Options
Downloads
Patches
Plain Diff
Ignore errors with differing file lengths in vis app
parent
64de2fa5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aeri_qc_web/interpret_qc.py
+8
-4
8 additions, 4 deletions
aeri_qc_web/interpret_qc.py
with
8 additions
and
4 deletions
aeri_qc_web/interpret_qc.py
+
8
−
4
View file @
d64fba0e
...
@@ -51,16 +51,20 @@ def ignore_error(func, error):
...
@@ -51,16 +51,20 @@ def ignore_error(func, error):
def
plot_check
(
nc
,
check
,
sum_hk
):
def
plot_check
(
nc
,
check
,
sum_hk
):
check_var
=
nc
.
variables
[
check
]
check_var
=
nc
.
variables
[
check
]
passes_qc
=
check_var
[:]
<
.
95
passes_qc
=
check_var
[:]
<
.
95
assert
len
(
passes_qc
)
==
len
(
sum_hk
)
if
len
(
passes_qc
)
!=
len
(
sum_hk
):
print
(
"
len(passes_qc) = {}
\n
len(sum_hk) = {}
"
.
format
(
len
(
passes_qc
),
len
(
sum_hk
)))
len_shortest
=
min
(
len
(
passes_qc
),
len
(
sum_hk
))
passes_qc
=
passes_qc
[:
len_shortest
]
for
depend
in
check_var
.
depends
.
split
(
'
,
'
):
for
depend
in
check_var
.
depends
.
split
(
'
,
'
):
if
depend
in
sum_hk
.
columns
:
if
depend
in
sum_hk
.
columns
:
fig
=
plt
.
figure
()
fig
=
plt
.
figure
()
# Passing check and qc_percent
# Passing check and qc_percent
ignore_error
(
lambda
:
sum_hk
[
depend
].
ix
[(
nc
.
variables
[
'
qc_percent
'
][:]
<
.
95
)
&
passes_qc
].
plot
(
style
=
'
b.
'
),
TypeError
)
ignore_error
(
lambda
:
sum_hk
[
depend
].
iloc
[:
len_shortest
].
ix
[(
nc
.
variables
[
'
qc_percent
'
][:
len_shortest
]
<
.
95
)
&
passes_qc
].
plot
(
style
=
'
b.
'
),
TypeError
)
# Passing check but fails overall
# Passing check but fails overall
ignore_error
(
lambda
:
sum_hk
[
depend
].
ix
[(
nc
.
variables
[
'
qc_percent
'
][:]
>
.
95
)
&
passes_qc
].
plot
(
style
=
'
k.
'
,
alpha
=
.
2
),
TypeError
)
ignore_error
(
lambda
:
sum_hk
[
depend
].
iloc
[:
len_shortest
].
ix
[(
nc
.
variables
[
'
qc_percent
'
][:
len_shortest
]
>
.
95
)
&
passes_qc
].
plot
(
style
=
'
k.
'
,
alpha
=
.
2
),
TypeError
)
# Failing check and implicitly failing overall
# Failing check and implicitly failing overall
ignore_error
(
lambda
:
sum_hk
[
depend
].
ix
[
~
passes_qc
].
plot
(
style
=
'
r.
'
),
TypeError
)
ignore_error
(
lambda
:
sum_hk
[
depend
].
iloc
[:
len_shortest
].
ix
[
~
passes_qc
].
plot
(
style
=
'
r.
'
),
TypeError
)
plt
.
xlabel
(
'
Record
'
)
plt
.
xlabel
(
'
Record
'
)
plt
.
title
(
depend
)
plt
.
title
(
depend
)
yield
mpld3
.
fig_to_html
(
fig
)
yield
mpld3
.
fig_to_html
(
fig
)
...
...
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