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
ed3937f5
Commit
ed3937f5
authored
8 years ago
by
Coda Phillips
Browse files
Options
Downloads
Patches
Plain Diff
Add abb check
parent
077b9174
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scene_checks.py
+1
-1
1 addition, 1 deletion
scene_checks.py
state_checks.py
+29
-23
29 additions, 23 deletions
state_checks.py
with
30 additions
and
24 deletions
scene_checks.py
+
1
−
1
View file @
ed3937f5
...
...
@@ -11,7 +11,7 @@ def hatch_check(frame, parameters):
hatch_closed_during_viewing
=
((
frame
.
hatchOpen
!=
1
)
&
(
~
frame
.
sceneMirrorPosition
.
isin
([
ord
(
'
H
'
),
ord
(
'
A
'
)])))
frame
[
'
hatch_check
'
]
=
hatch_closed_during_viewing
frame
[
'
hatch_check
'
]
=
hatch_closed_during_viewing
*
1
annotate_all
(
frame
,
hatch_closed_during_viewing
,
'
hatch closed
'
)
return
frame
...
...
This diff is collapsed.
Click to expand it.
state_checks.py
+
29
−
23
View file @
ed3937f5
...
...
@@ -16,39 +16,45 @@ def detector_check(frame, parameters):
return
frame
def
hbb_thermistor_check
(
frame
,
parameters
):
return
thermistor_check
(
frame
,
'
HBB
'
,
331
,
335
)
def
abb_thermistor_check
(
frame
,
parameters
):
return
thermistor_check
(
frame
,
'
ABB
'
,
150
,
335
)
def
thermistor_check
(
frame
,
bb
,
low
,
high
):
"""
Check that all
HBB
thermistor temps are in range
Check that all thermistor temps are in range
"""
if
not
np
.
in1d
([
'
HBB
bottomTemp
'
,
'
HBB
apexTemp
'
,
'
HBB
topTemp
'
],
frame
.
columns
).
all
():
if
not
np
.
in1d
([
x
.
format
(
bb
)
for
x
in
[
'
{}
bottomTemp
'
,
'
{}
apexTemp
'
,
'
{}
topTemp
'
]
]
,
frame
.
columns
).
all
():
return
frame
h
bbb_too_low
=
(
frame
[
'
HBB
bottomTemp
'
]
-
333
)
<
-
2
h
bba_too_low
=
(
frame
[
'
HBB
apexTemp
'
]
-
333
)
<
-
2
h
bbt_too_low
=
(
frame
[
'
HBB
topTemp
'
]
-
333
)
<
-
2
h
bbb_too_high
=
(
frame
[
'
HBB
bottomTemp
'
]
-
333
)
>
2
h
bba_too_high
=
(
frame
[
'
HBB
apexTemp
'
]
-
333
)
>
2
h
bbt_too_high
=
(
frame
[
'
HBB
topTemp
'
]
-
333
)
>
2
h
bbb_problem
=
h
bbb_too_low
|
h
bbb_too_high
h
bba_problem
=
h
bba_too_low
|
h
bba_too_high
h
bbt_problem
=
h
bbt_too_low
|
h
bbt_too_high
bbb_too_low
=
frame
[
'
{}
bottomTemp
'
.
format
(
bb
)]
<
low
bba_too_low
=
frame
[
'
{}
apexTemp
'
.
format
(
bb
)]
<
low
bbt_too_low
=
frame
[
'
{}
topTemp
'
.
format
(
bb
)]
<
low
bbb_too_high
=
frame
[
'
{}
bottomTemp
'
.
format
(
bb
)]
>
high
bba_too_high
=
frame
[
'
{}
apexTemp
'
.
format
(
bb
)]
>
high
bbt_too_high
=
frame
[
'
{}
topTemp
'
.
format
(
bb
)]
>
high
bbb_problem
=
bbb_too_low
|
bbb_too_high
bba_problem
=
bba_too_low
|
bba_too_high
bbt_problem
=
bbt_too_low
|
bbt_too_high
# Record qc for each thermistor
# qc variables are probabilites between 0 and 1
variable_qcs
=
pd
.
DataFrame
({
'
qc_
HBB
bottomTemp
'
:
h
bbb_problem
*
1
,
'
qc_
HBB
apexTemp
'
:
h
bba_problem
*
1
,
'
qc_
HBB
topTemp
'
:
h
bbt_problem
*
1
'
qc_
{}
bottomTemp
'
.
format
(
bb
)
:
bbb_problem
*
1
,
'
qc_
{}
apexTemp
'
.
format
(
bb
)
:
bba_problem
*
1
,
'
qc_
{}
topTemp
'
.
format
(
bb
)
:
bbt_problem
*
1
},
index
=
frame
.
index
)
frame
=
update_variable_qc
(
frame
,
variable_qcs
)
# Compute overall BB quality
frame
[
'
hbb
_thermistor_check
'
]
=
(
h
bbb_problem
|
h
bba_problem
|
h
bbt_problem
)
*
1
annotate_all
(
frame
,
h
bbb_too_low
,
'
HBB
bottom temperature too low
'
)
annotate_all
(
frame
,
h
bbt_too_low
,
'
HBB
top temperature too low
'
)
annotate_all
(
frame
,
h
bba_too_low
,
'
HBB
apex temperature too low
'
)
annotate_all
(
frame
,
h
bbb_too_high
,
'
HBB
bottom temperature too high
'
)
annotate_all
(
frame
,
h
bbt_too_high
,
'
HBB
top temperature too high
'
)
annotate_all
(
frame
,
h
bba_too_high
,
'
HBB
apex temperature too high
'
)
frame
=
invalidate_records
(
frame
,
'
hbb
_thermistor_check
'
)
frame
[
'
{}
_thermistor_check
'
.
format
(
bb
.
lower
())
]
=
(
bbb_problem
|
bba_problem
|
bbt_problem
)
*
1
annotate_all
(
frame
,
bbb_too_low
,
'
{}
bottom temperature too low
'
.
format
(
bb
)
)
annotate_all
(
frame
,
bbt_too_low
,
'
{}
top temperature too low
'
.
format
(
bb
)
)
annotate_all
(
frame
,
bba_too_low
,
'
{}
apex temperature too low
'
.
format
(
bb
)
)
annotate_all
(
frame
,
bbb_too_high
,
'
{}
bottom temperature too high
'
.
format
(
bb
)
)
annotate_all
(
frame
,
bbt_too_high
,
'
{}
top temperature too high
'
.
format
(
bb
)
)
annotate_all
(
frame
,
bba_too_high
,
'
{}
apex temperature too high
'
.
format
(
bb
)
)
frame
=
invalidate_records
(
frame
,
'
{}
_thermistor_check
'
.
format
(
bb
.
lower
())
)
return
frame
def
hbb_stable_check
(
frame
,
parameters
):
...
...
@@ -76,7 +82,7 @@ def hbb_stable_check(frame, parameters):
return
frame
class
CheckList
(
BaseCheckList
):
checks
=
[
detector_check
,
hbb_thermistor_check
,
hbb_stable_check
]
checks
=
[
detector_check
,
hbb_thermistor_check
,
hbb_stable_check
,
abb_thermistor_check
]
#### TESTS ####
...
...
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