Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IPI_annot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Maxence Ferrari
IPI_annot
Compare revisions
f95db74adc5b94a72c21ede81abb4e6d10eddcca to 05fea75c7a5d9a7212eeb450f4635afe2b17a53d
You need to sign in or sign up before continuing.
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
maxence.ferrari/ipi_annot
Select target project
No results found
05fea75c7a5d9a7212eeb450f4635afe2b17a53d
Select Git revision
Swap
Target
maxence.ferrari/ipi_annot
Select target project
maxence.ferrari/ipi_annot
1 result
f95db74adc5b94a72c21ede81abb4e6d10eddcca
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Reformat code
· 374c298c
maxence
authored
2 years ago
374c298c
Merge remote-tracking branch 'origin/master'
· 05fea75c
maxence
authored
2 years ago
# Conflicts: # ipi_extract.py
05fea75c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ipi_extract.py
+18
-6
18 additions, 6 deletions
ipi_extract.py
with
18 additions
and
6 deletions
ipi_extract.py
View file @
05fea75c
...
...
@@ -141,7 +141,7 @@ class MyMultiCursor(AxesWidget):
lineprops
[
'
animated
'
]
=
True
self
.
linev
=
[]
for
i
in
range
(
self
.
n_axes
):
self
.
linev
.
append
(
axes
[
i
].
axvline
(
axes
[
i
].
get_xbound
()[
0
],
visible
=
False
,
**
lineprops
))
self
.
linev
.
append
(
axes
[
i
].
axes
.
axvline
(
axes
[
i
].
axes
.
get_xbound
()[
0
],
visible
=
False
,
**
lineprops
))
self
.
background
=
self
.
n_axes
*
[
None
]
self
.
needclear
=
False
...
...
@@ -152,7 +152,7 @@ class MyMultiCursor(AxesWidget):
return
for
i
in
range
(
self
.
n_axes
):
if
self
.
useblit
:
self
.
background
[
i
]
=
self
.
canvas
.
copy_from_bbox
(
self
.
axes
[
i
].
bbox
)
self
.
background
[
i
]
=
self
.
canvas
.
copy_from_bbox
(
self
.
axes
[
i
].
axes
.
bbox
)
self
.
linev
[
i
].
set_visible
(
False
)
def
onmove
(
self
,
event
):
...
...
@@ -171,7 +171,9 @@ class MyMultiCursor(AxesWidget):
self
.
needclear
=
True
if
not
self
.
visible
:
return
ax_idx
=
self
.
axes
.
index
(
event
.
inaxes
)
for
ax_idx
,
ax
in
enumerate
(
self
.
axes
):
if
ax
.
axes
==
event
.
inaxes
:
break
if
ax_idx
<
2
:
if
ax_idx
==
1
:
pos
=
event
.
xdata
*
1e3
...
...
@@ -225,8 +227,8 @@ class MyMultiCursor(AxesWidget):
for
i
in
range
(
self
.
n_axes
):
if
self
.
background
[
i
]
is
not
None
:
self
.
canvas
.
restore_region
(
self
.
background
[
i
])
self
.
axes
[
i
].
draw_artist
(
self
.
linev
[
i
])
self
.
canvas
.
blit
(
self
.
axes
[
i
].
bbox
)
self
.
axes
[
i
].
axes
.
draw_artist
(
self
.
linev
[
i
])
self
.
canvas
.
blit
(
self
.
axes
[
i
].
axes
.
bbox
)
else
:
self
.
canvas
.
draw_idle
()
return
False
...
...
@@ -574,6 +576,10 @@ class AxesWithCursor:
for
cursor
in
self
.
cursors
:
cursor
.
set_visible
(
state
)
@property
def
figure
(
self
):
return
self
.
axes
.
figure
class
AxesGroup
:
__slots__
=
[
'
signal
'
,
'
spectrogram
'
,
'
correlation
'
,
'
cepstrum
'
]
...
...
@@ -592,7 +598,7 @@ class AxesGroup:
(
ax_spec
.
axvline
(
0.01
,
c
=
'
k
'
,
linestyle
=
'
--
'
),
ax_spec
.
axvline
(
0.01
,
c
=
'
k
'
)))
self
.
spectrogram
.
im
.
set_clim
(
2000
,
2100
)
ax_spec
.
set_ylim
(
0
,
min
(
20e3
,
sr
/
2
))
ax_spec
.
set_ytick
s
labels
((
ax_spec
.
get_yticks
()
/
1e3
).
astype
(
int
))
ax_spec
.
set_yticklabels
((
ax_spec
.
get_yticks
()
/
1e3
).
astype
(
int
))
self
.
correlation
=
AxesWithCursor
(
ax_corr
,
ax_corr
.
plot
(
np
.
linspace
(
0
,
10
,
int
(
10e-3
*
sr
),
False
),
np
.
zeros
(
int
(
10e-3
*
sr
)))[
0
],
...
...
@@ -618,6 +624,12 @@ class AxesGroup:
def
__len__
(
self
):
return
4
def
__contains__
(
self
,
item
):
if
isinstance
(
item
,
AxesWithCursor
):
return
any
(
item
==
ax
for
ax
in
self
)
else
:
return
any
(
item
==
ax
.
axes
for
ax
in
self
)
def
set_visible
(
self
,
state
):
self
.
signal
.
set_visible
(
state
)
self
.
spectrogram
.
set_visible
(
state
)
...
...
This diff is collapsed.
Click to expand it.