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
85f33645
Commit
85f33645
authored
5 years ago
by
Jameson Rollins
Browse files
Options
Downloads
Plain Diff
Merge branch 'brs_cleanup' into 'master'
Cleanup BRS glitch code See merge request
!88
parents
427f7903
37168f5f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
locklost/config.py
+0
-56
0 additions, 56 deletions
locklost/config.py
locklost/plugins/brs.py
+65
-5
65 additions, 5 deletions
locklost/plugins/brs.py
locklost/web/templates/event.tpl
+20
-11
20 additions, 11 deletions
locklost/web/templates/event.tpl
with
85 additions
and
72 deletions
locklost/config.py
+
0
−
56
View file @
85f33645
...
...
@@ -226,62 +226,6 @@ LPY_CHANNELS = ifochans(LPY_CHANNELS)
##################################################
BRS_SEARCH_WINDOW
=
[
-
30
,
5
]
BRS_THRESHOLD
=
15
# H1 checks single status channel that says what combination of BRSX/BRSY is
# being used
if
IFO
==
'
H1
'
:
BRS_CONFIG
=
{
'
ETMX
'
:
{
'
axis
'
:
'
RY
'
,
'
skip_states
'
:
{
65
},
},
'
ETMY
'
:
{
'
axis
'
:
'
RX
'
,
'
skip_states
'
:
{
60
},
},
}
for
station
in
BRS_CONFIG
:
BRS_CONFIG
[
station
][
'
state_chan
'
]
=
'
H1:GRD-SEI_CONF_REQUEST_N
'
BRS_CONFIG
[
station
][
'
skip_states
'
]
|=
{
10
,
17
,
45
}
# L1 checks status channels for each individual BRS (ETMs and ITMs) that says
# whether it's being used
elif
IFO
==
'
L1
'
:
BRS_CONFIG
=
{
'
ITMX
'
:
{
'
axis
'
:
'
RY
'
,
'
state_chan
'
:
'
L1:ISI-ITMX_ST1_SENSCOR_X_FADE_CUR_CHAN_MON
'
,
},
'
ETMX
'
:
{
'
axis
'
:
'
RY
'
,
'
state_chan
'
:
'
L1:ISI-ETMX_ST1_SENSCOR_Y_FADE_CUR_CHAN_MON
'
,
},
'
ITMY
'
:
{
'
axis
'
:
'
RX
'
,
'
state_chan
'
:
'
L1:ISI-ITMY_ST1_SENSCOR_Y_FADE_CUR_CHAN_MON
'
,
},
'
ETMY
'
:
{
'
axis
'
:
'
RX
'
,
'
state_chan
'
:
'
L1:ISI-ETMY_ST1_SENSCOR_Y_FADE_CUR_CHAN_MON
'
,
},
}
for
station
in
BRS_CONFIG
:
BRS_CONFIG
[
station
][
'
skip_states
'
]
=
{
8
,
9
}
for
station
,
params
in
BRS_CONFIG
.
items
():
BRS_CONFIG
[
station
][
'
channels
'
]
=
[
'
{}:ISI-GND_BRS_{}_{}_BLRMS_{}
'
.
format
(
IFO
,
station
,
params
[
'
axis
'
],
ending
)
\
for
ending
in
[
'
100M_300M
'
,
'
300M_1
'
,
'
1_3
'
,
]]
##################################################
BOARD_SAT_CM
=
[
'
mediumseagreen
'
,
'
cornflowerblue
'
,
...
...
This diff is collapsed.
Click to expand it.
locklost/plugins/brs.py
+
65
−
5
View file @
85f33645
...
...
@@ -8,6 +8,66 @@ from .. import config
from
..
import
data
from
..
import
plotutils
#################################################
CHANNEL_ENDINGS
=
[
'
100M_300M
'
,
'
300M_1
'
,
'
1_3
'
,
]
# H1 checks single status channel that says what combination of BRSX/BRSY is
# being used
if
config
.
IFO
==
'
H1
'
:
CONFIG
=
{
'
ETMX
'
:
{
'
skip_states
'
:
{
65
},
'
axis
'
:
'
RY
'
,
},
'
ETMY
'
:
{
'
skip_states
'
:
{
60
},
'
axis
'
:
'
RX
'
,
},
}
for
station
in
CONFIG
:
CONFIG
[
station
][
'
state_chan
'
]
=
'
H1:GRD-SEI_CONF_REQUEST_N
'
CONFIG
[
station
][
'
skip_states
'
]
|=
{
10
,
17
,
45
}
# L1 checks status channels for each individual BRS (ETMs and ITMs) that says
# whether it's being used
elif
config
.
IFO
==
'
L1
'
:
CONFIG
=
{
'
ITMX
'
:
{
'
state_chan
'
:
'
L1:ISI-ITMX_ST1_SENSCOR_X_FADE_CUR_CHAN_MON
'
,
'
axis
'
:
'
RY
'
,
},
'
ETMX
'
:
{
'
state_chan
'
:
'
L1:ISI-ETMX_ST1_SENSCOR_Y_FADE_CUR_CHAN_MON
'
,
'
axis
'
:
'
RY
'
,
},
'
ITMY
'
:
{
'
state_chan
'
:
'
L1:ISI-ITMY_ST1_SENSCOR_Y_FADE_CUR_CHAN_MON
'
,
'
axis
'
:
'
RX
'
,
},
'
ETMY
'
:
{
'
state_chan
'
:
'
L1:ISI-ETMY_ST1_SENSCOR_Y_FADE_CUR_CHAN_MON
'
,
'
axis
'
:
'
RX
'
,
},
}
for
station
in
CONFIG
:
CONFIG
[
station
][
'
skip_states
'
]
=
{
8
,
9
}
for
station
in
CONFIG
:
channels
=
[]
for
ending
in
CHANNEL_ENDINGS
:
channels
.
append
(
'
{}:ISI-GND_BRS_{}_{}_BLRMS_{}
'
.
format
(
config
.
IFO
,
station
,
CONFIG
[
station
][
'
axis
'
],
ending
))
CONFIG
[
station
][
'
channels
'
]
=
channels
THRESHOLD
=
15
SEARCH_WINDOW
=
[
-
30
,
5
]
#################################################
def
check_brs
(
event
):
"""
Checks for BRS glitches at both end stations.
...
...
@@ -19,9 +79,9 @@ def check_brs(event):
plotutils
.
set_rcparams
()
segment
=
Segment
(
config
.
BRS_
SEARCH_WINDOW
).
shift
(
int
(
event
.
gps
))
segment
=
Segment
(
SEARCH_WINDOW
).
shift
(
int
(
event
.
gps
))
for
station
,
params
in
config
.
BRS_
CONFIG
.
items
():
for
station
,
params
in
CONFIG
.
items
():
# fetch all data (state and data)
channels
=
[
params
[
'
state_chan
'
]]
+
params
[
'
channels
'
]
try
:
...
...
@@ -44,10 +104,10 @@ def check_brs(event):
thresh_crossing
=
segment
[
1
]
for
channel
,
buf
in
buf_dict
.
items
():
max_brs
=
max
([
max_brs
,
max
(
buf
.
data
)])
if
any
(
buf
.
data
>
config
.
BRS_
THRESHOLD
):
if
any
(
buf
.
data
>
THRESHOLD
):
logging
.
info
(
'
BRS GLITCH DETECTED in {}
'
.
format
(
channel
))
event
.
add_tag
(
'
BRS_GLITCH
'
)
glitch_idx
=
np
.
where
(
buf
.
data
>
config
.
BRS_
THRESHOLD
)[
0
][
0
]
glitch_idx
=
np
.
where
(
buf
.
data
>
THRESHOLD
)[
0
][
0
]
glitch_time
=
buf
.
tarray
[
glitch_idx
]
thresh_crossing
=
min
(
glitch_time
,
thresh_crossing
)
...
...
@@ -62,7 +122,7 @@ def check_brs(event):
lw
=
2
,
)
ax
.
axhline
(
config
.
BRS_
THRESHOLD
,
THRESHOLD
,
linestyle
=
'
--
'
,
color
=
'
black
'
,
label
=
'
BRS glitch threshold
'
,
...
...
This diff is collapsed.
Click to expand it.
locklost/web/templates/event.tpl
+
20
−
11
View file @
85f33645
...
...
@@ -4,6 +4,7 @@
% from datetime import timedelta
% from locklost import config
% from locklost.web.utils import analysis_status_button, event_plot_urls
% from locklost.plugins import brs
<!-- event status button -->
% status_button = analysis_status_button(event)
...
...
@@ -96,22 +97,30 @@
<div
class=
"container"
>
<br
/>
% brs_plots = []
% brs_
un
used =
[]
% for station in
config.BRS_
CONFIG:
% brs_used =
{
station
:
True
for
station
in
brs
.
CONFIG
}
% for station in
brs.
CONFIG:
% if os.path.exists(event.path('brs_{}.png'.format(station))):
% brs_plots.append(event.url('brs_{}.png'.format(station)))
% else:
% brs_
un
used
.append(station)
% brs_used
[station] = False
% end
% end
<div
class=
"row"
>
% include('collapsed_plots.tpl', title ='BRS plots', id='brs', plots=brs_plots, size=5, section='main', expand=event.has_tag('BRS_GLITCH'))
</div>
% for station in brs_unused:
<br/>
<div
class=
"row"
>
<p>
{
{
station
}
} not using sensor correction during lockloss
</p>
</div>
% if any(status is True for status in brs_used.values()):
<div
class=
"row"
>
% include('collapsed_plots.tpl', title ='BRS plots', id='brs', plots=brs_plots, size=5, section='main', expand=event.has_tag('BRS_GLITCH'))
</div>
% end
% if not any(brs_used.values()):
<h3>
BRS plots
</h3>
% end
% for endstation, used in brs_used.items():
% if not used:
<br/>
<div
class=
"row"
>
<p>
{
{
endstation
}
} not using sensor correction during lockloss
</p>
</div>
% end
% end
</div>
...
...
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