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
ac267496
Commit
ac267496
authored
4 years ago
by
Jameson Rollins
Browse files
Options
Downloads
Plain Diff
Merge branch 'suspension_grid' into 'master'
See merge request
jameson.rollins/locklost!100
parents
643c5286
7ddd00aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
locklost/summary.py
+31
-2
31 additions, 2 deletions
locklost/summary.py
with
31 additions
and
2 deletions
locklost/summary.py
+
31
−
2
View file @
ac267496
...
...
@@ -32,7 +32,7 @@ def grab_data(gps):
"""
shift_times
=
{
'
H1
'
:
[
np
.
arange
(
0
,
8
),
np
.
arange
(
8
,
16
),
np
.
arange
(
16
,
24
)],
'
L1
'
:
[
np
.
concatenate
(([
23
,
24
],
np
.
arange
(
22
,
8
))),
np
.
arange
(
8
,
12
),
np
.
arange
(
12
,
22
)]
'
L1
'
:
[
np
.
concatenate
(([
23
],
np
.
arange
(
0
,
8
))),
np
.
arange
(
8
,
12
),
np
.
arange
(
12
,
22
)]
}
shift_names
=
[
'
owl
'
,
'
day
'
,
'
eve
'
]
shifts
=
{
...
...
@@ -178,7 +178,7 @@ def get_five_sats(sat_path):
sat1
=
sat_123
[
0
]
sat2
=
sat_123
[
1
].
split
(
'
_
'
)[
0
]
sat3
=
sat_123
[
1
].
split
(
'
_
'
)[
1
]
channel_shorthand
=
'
%s
%s
%s
'
%
(
sat1
,
sat2
,
sat3
)
channel_shorthand
=
'
%s %s
'
%
(
sat2
,
sat3
)
# Make sure the degenerate channels don't get added
if
channel_shorthand
not
in
five_sats
:
five_sats
=
np
.
append
(
five_sats
,
channel_shorthand
)
...
...
@@ -324,6 +324,35 @@ def plot_summary(path, epoch):
fig
.
savefig
(
outpath_plot
,
bbox_inches
=
'
tight
'
)
plt
.
close
()
#saturating suspension grid plot
y_sats
=
sorted
(
list
(
set
([
i
[
0
]
for
i
in
five_sats
])))
x_sats
=
sorted
(
list
(
set
([
item
for
sublist
in
five_sats
for
item
in
sublist
[
1
:]])))
sat_grid
=
np
.
zeros
((
len
(
y_sats
),
len
(
x_sats
)))
for
y_idx
,
yval
in
enumerate
(
y_sats
):
for
x_idx
,
xval
in
enumerate
(
x_sats
):
for
sat_set
in
five_sats
:
if
yval
==
sat_set
[
0
]:
if
xval
in
sat_set
[
1
:]:
sat_grid
[
y_idx
][
x_idx
]
+=
1
fig
,
ax
=
plt
.
subplots
(
1
,
figsize
=
(
22
,
16
))
img
=
ax
.
imshow
(
sat_grid
,
interpolation
=
'
nearest
'
,)
ax
.
set_xlabel
(
'
2nd-5th saturating suspension
'
,
labelpad
=
10
)
ax
.
tick_params
(
width
=
5
)
ax
.
set_ylabel
(
'
First saturating suspension
'
)
ax
.
set_title
(
'
O3 suspension correlations: %s
'
%
(
epoch
))
ax
.
set_xticks
(
np
.
arange
(
len
(
x_sats
)))
ax
.
set_yticks
(
np
.
arange
(
len
(
y_sats
)))
ax
.
set_xticklabels
(
x_sats
,
rotation
=
45
,
ha
=
'
right
'
)
ax
.
set_yticklabels
(
y_sats
)
fig
.
tight_layout
()
cbar
=
fig
.
colorbar
(
img
)
cbar
.
set_label
(
'
# of locklosses
'
)
outpath_plot
=
os
.
path
.
join
(
epoch_path
,
'
suspension_grid
'
)
fig
.
savefig
(
outpath_plot
,
bbox_inches
=
'
tight
'
)
plt
.
close
()
######################################################
def
_parser_add_arguments
(
parser
):
...
...
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