Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
locklost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Benjamin Mannix
locklost
Commits
acc219f7
Commit
acc219f7
authored
3 years ago
by
Yannick Lecoeuche
Committed by
Jameson Rollins
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Only refine time if new lockloss time is before ISC_LOCK lockloss
parent
8f3ea65f
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
locklost/plugins/refine.py
+8
-5
8 additions, 5 deletions
locklost/plugins/refine.py
with
8 additions
and
5 deletions
locklost/plugins/refine.py
+
8
−
5
View file @
acc219f7
...
...
@@ -141,12 +141,14 @@ def plot_indicators(event, params, refined_gps=None, threshold=None):
fig
.
savefig
(
outpath
)
def
find_transition
(
channel
,
segment
,
std_threshold
,
minimum
=
None
):
def
find_transition
(
channel
,
segment
,
std_threshold
,
max_time
,
minimum
=
None
):
"""
Find transition in channel
`segment` is the time segment to search, `std_threshold` is the % std
from mean defining the transition threshold, `minimum` is an optional
minimum value that the channel will be checked against.
from mean defining the transition threshold, `max_time` is the event.gps
lockloss gps time from the GRD state transition used as a maximum
refined time, `minimum` is an optional minimum value that the channel
will be checked against.
returns `threshold`, `refined_gps` tuple
...
...
@@ -176,9 +178,9 @@ def find_transition(channel, segment, std_threshold, minimum=None):
else
:
if
std_threshold
>
0
:
inds
=
np
.
where
(
buf
.
data
>
threshold
)[
0
]
inds
=
np
.
where
(
(
buf
.
data
>
threshold
)
&
(
buf
.
tarray
<
max_time
))
[
0
]
else
:
inds
=
np
.
where
(
buf
.
data
<
threshold
)[
0
]
inds
=
np
.
where
(
(
buf
.
data
<
threshold
)
&
(
buf
.
tarray
<
max_time
))
[
0
]
if
inds
.
any
():
ind
=
np
.
min
(
inds
)
...
...
@@ -211,6 +213,7 @@ def refine_time(event):
[
params
[
'
CHANNEL
'
],],
segment
,
params
[
'
THRESHOLD
'
],
event
.
gps
,
params
[
'
MINIMUM
'
],
)
...
...
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