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

refactor mirror safing code

parent 54d510cf
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -24,7 +24,7 @@ def safing_check(frame, parameters):
if not np.in1d(['hatchOpen','sceneMirrorPosition'], frame.columns).all():
return frame
hatch_closing = ((frame.hatchOpen == 1) & ((frame.hatchOpen == -3).diff(-1) == 1)).shift(1)
hatch_closing = (frame.hatchOpen == 1).shift(1) & (frame.hatchOpen == -3)
mirror_safing = (hatch_closing & frame.sceneMirrorPosition.isin([ord('H'), ord('A')]))
frame['safing_check'] = mirror_safing * 1
annotate_all(frame, mirror_safing, 'mirror likely safed during view')
......
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