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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxence Ferrari
IPI_annot
Commits
8f22b7d1
Commit
8f22b7d1
authored
4 years ago
by
ferrari
Browse files
Options
Downloads
Patches
Plain Diff
Make annotated clicks black
parent
b66c0d27
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-0
1 addition, 0 deletions
README.md
ipi_extract.py
+9
-2
9 additions, 2 deletions
ipi_extract.py
with
10 additions
and
2 deletions
README.md
+
1
−
0
View file @
8f22b7d1
...
@@ -46,6 +46,7 @@ Clicking on the sound signal will select the click that will be analysed. The cl
...
@@ -46,6 +46,7 @@ Clicking on the sound signal will select the click that will be analysed. The cl
The click will then be displayed in one of the 3 groups of plots selected by the radio button bellow them.
The click will then be displayed in one of the 3 groups of plots selected by the radio button bellow them.
While hovering above the signal, the cursor will have the color of the selected group.
While hovering above the signal, the cursor will have the color of the selected group.
Clicking on a new click will change the click to be analysed. An already analysed click can be clicked again.
Clicking on a new click will change the click to be analysed. An already analysed click can be clicked again.
Unselected clicks will be black if any fields have been annotated, and purple otherwise.
*
Note that a click can be assigned to two groups of plots. This currently cause desyncs in the display of the annotation.
*
Note that a click can be assigned to two groups of plots. This currently cause desyncs in the display of the annotation.
In future an update, this might either be fixed, or the possibilities of selecting the same click for multiple groups will be removed
*
In future an update, this might either be fixed, or the possibilities of selecting the same click for multiple groups will be removed
*
...
...
This diff is collapsed.
Click to expand it.
ipi_extract.py
+
9
−
2
View file @
8f22b7d1
...
@@ -287,7 +287,10 @@ class Callback(object):
...
@@ -287,7 +287,10 @@ class Callback(object):
pos
=
int
(
FSSR
*
event
.
xdata
)
pos
=
int
(
FSSR
*
event
.
xdata
)
mpos
=
np
.
argmax
(
self
.
song_resample
[
max
(
pos
-
int
(
FSSR
*
FSPK
),
0
):
pos
+
int
(
FSSR
*
FSPK
)])
+
max
(
pos
-
int
(
FSSR
*
FSPK
),
0
)
mpos
=
np
.
argmax
(
self
.
song_resample
[
max
(
pos
-
int
(
FSSR
*
FSPK
),
0
):
pos
+
int
(
FSSR
*
FSPK
)])
+
max
(
pos
-
int
(
FSSR
*
FSPK
),
0
)
if
self
.
curr_ind
[
self
.
curr
]
is
not
None
:
if
self
.
curr_ind
[
self
.
curr
]
is
not
None
:
if
np
.
all
(
np
.
isnan
(
list
(
self
.
df
[
self
.
offset
[
self
.
curr_ind
[
self
.
curr
],
0
]].
values
()))):
self
.
scat
.
_facecolors
[
self
.
curr_ind
[
self
.
curr
]]
=
[
0.7
,
0.2
,
0.5
,
1
]
self
.
scat
.
_facecolors
[
self
.
curr_ind
[
self
.
curr
]]
=
[
0.7
,
0.2
,
0.5
,
1
]
else
:
self
.
scat
.
_facecolors
[
self
.
curr_ind
[
self
.
curr
]]
=
[
0
,
0
,
0
,
1
]
if
mpos
/
FSSR
not
in
self
.
offset
[:,
0
]:
if
mpos
/
FSSR
not
in
self
.
offset
[:,
0
]:
self
.
offset
=
np
.
concatenate
([
self
.
offset
,
[[
mpos
/
FSSR
,
self
.
song_resample
[
mpos
]]]],
axis
=
0
)
self
.
offset
=
np
.
concatenate
([
self
.
offset
,
[[
mpos
/
FSSR
,
self
.
song_resample
[
mpos
]]]],
axis
=
0
)
self
.
scat
.
set_offsets
(
self
.
offset
)
self
.
scat
.
set_offsets
(
self
.
offset
)
...
@@ -722,7 +725,11 @@ def main(args):
...
@@ -722,7 +725,11 @@ def main(args):
ref_dict
[
'
callback
'
].
offset
=
np
.
tile
(
np
.
array
(
list
(
ref_dict
[
'
callback
'
].
df
.
keys
()))[:,
np
.
newaxis
],
(
1
,
2
))
ref_dict
[
'
callback
'
].
offset
=
np
.
tile
(
np
.
array
(
list
(
ref_dict
[
'
callback
'
].
df
.
keys
()))[:,
np
.
newaxis
],
(
1
,
2
))
ref_dict
[
'
callback
'
].
offset
[:,
1
]
=
ref_dict
[
'
callback
'
].
song_resample
[(
ref_dict
[
'
callback
'
].
offset
[:,
1
]
*
FSSR
).
astype
(
int
)]
ref_dict
[
'
callback
'
].
offset
[:,
1
]
=
ref_dict
[
'
callback
'
].
song_resample
[(
ref_dict
[
'
callback
'
].
offset
[:,
1
]
*
FSSR
).
astype
(
int
)]
ref_dict
[
'
callback
'
].
scat
.
set_offsets
(
ref_dict
[
'
callback
'
].
offset
)
ref_dict
[
'
callback
'
].
scat
.
set_offsets
(
ref_dict
[
'
callback
'
].
offset
)
ref_dict
[
'
callback
'
].
scat
.
set_color
(
np
.
array
(
len
(
ref_dict
[
'
callback
'
].
offset
)
*
[[
0.7
,
0.2
,
0.5
,
1
]]))
colors
=
np
.
array
(
len
(
ref_dict
[
'
callback
'
].
offset
)
*
[[
0.7
,
0.2
,
0.5
,
1
]])
for
i
,
p
in
enumerate
(
ref_dict
[
'
callback
'
].
offset
[:,
0
]):
if
not
np
.
all
(
np
.
isnan
(
list
(
ref_dict
[
'
callback
'
].
df
[
p
].
values
()))):
colors
[
i
]
=
[
0
,
0
,
0
,
1
]
ref_dict
[
'
callback
'
].
scat
.
set_color
(
colors
)
plt
.
draw
()
plt
.
draw
()
plt
.
pause
(
0.2
)
plt
.
pause
(
0.2
)
ref_dict
[
'
fig
'
].
set_constrained_layout
(
False
)
ref_dict
[
'
fig
'
].
set_constrained_layout
(
False
)
...
...
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