Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LarvaTagger.jl
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
Nyx
LarvaTagger.jl
Commits
0a1b2f24
Commit
0a1b2f24
authored
3 years ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
implements
#39
with 2 levels
parent
ea08fead
No related branches found
No related tags found
No related merge requests found
Pipeline
#82406
passed
3 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/models.jl
+10
-0
10 additions, 0 deletions
src/models.jl
src/viewer.jl
+8
-1
8 additions, 1 deletion
src/viewer.jl
src/wgl.jl
+8
-3
8 additions, 3 deletions
src/wgl.jl
with
26 additions
and
4 deletions
src/models.jl
+
10
−
0
View file @
0a1b2f24
...
@@ -270,3 +270,13 @@ function medianlarvasize(larvae::Vector{LarvaModel}; n::Int=100)
...
@@ -270,3 +270,13 @@ function medianlarvasize(larvae::Vector{LarvaModel}; n::Int=100)
end
end
return
median
(
sizes
)
return
median
(
sizes
)
end
end
function
simultaneouslarvae
(
larvae
)
laststep
=
maximum
([
larva
.
alignedsteps
[
end
]
for
larva
in
values
(
larvae
)])
n
=
0
for
step
in
1
:
20
:
laststep
n
=
max
(
n
,
count
(
larva
->
larva
.
alignedsteps
[
1
]
<=
step
<=
larva
.
alignedsteps
[
end
],
values
(
larvae
)))
end
return
n
end
This diff is collapsed.
Click to expand it.
src/viewer.jl
+
8
−
1
View file @
0a1b2f24
...
@@ -67,7 +67,14 @@ function larvaviewer(controller;
...
@@ -67,7 +67,14 @@ function larvaviewer(controller;
controller
[
:
player
]
=
player
=
timecontroller
(
times
)
controller
[
:
player
]
=
player
=
timecontroller
(
times
)
controller
[
:
larva
]
=
larva
=
LarvaController
(
controller
,
model
,
tag_lut
,
player
)
controller
[
:
larva
]
=
larva
=
LarvaController
(
controller
,
model
,
tag_lut
,
player
)
delayed_controller
=
slave
(
larva
,
PeriodicObservation
(
1.0
))
n_simultaneous_larvae
=
simultaneouslarvae
(
model
)
if
40
<
n_simultaneous_larvae
@info
"Refresh rate throttled to 1Hz"
n_simultaneous_larvae
delayed_controller
=
slave
(
larva
,
PeriodicObservation
(
1.0
))
else
delayed_controller
=
larva
end
on
(
getactivelarva
(
controller
))
do
id
on
(
getactivelarva
(
controller
))
do
id
@info
isnothing
(
id
)
?
"No active larva"
:
"Activating larva #
$(id)
"
@info
isnothing
(
id
)
?
"No active larva"
:
"Activating larva #
$(id)
"
...
...
This diff is collapsed.
Click to expand it.
src/wgl.jl
+
8
−
3
View file @
0a1b2f24
...
@@ -129,10 +129,15 @@ function AssayPlot(ctrl, larvae::DecoratedLarvae; size=(1000, 750))
...
@@ -129,10 +129,15 @@ function AssayPlot(ctrl, larvae::DecoratedLarvae; size=(1000, 750))
AssayPlot
(
ctrl
,
fig
,
ax
,
larvae
,
button
)
AssayPlot
(
ctrl
,
fig
,
ax
,
larvae
,
button
)
end
end
function
AssayPlot
(
ctrl
,
larvae
::
Vector
{
LarvaModel
};
kwargs
...
)
function
AssayPlot
(
ctrl
,
larvae
::
Vector
{
LarvaModel
};
downsampling_threshold
=
1e5
,
kwargs
...
)
sample
=
downsampler
()
npoints
=
sum
([
length
(
larva
.
path
)
for
larva
in
larvae
])
if
downsampling_threshold
<=
npoints
@info
"Trajectory down-sampling active"
npoints
sample
=
downsampler
()
larvae
=
sample
.
(
larvae
)
end
plot
=
AssayPlot
(
ctrl
,
plot
=
AssayPlot
(
ctrl
,
DecoratedLarvae
(
sample
.
(
larvae
)
,
DecoratedLarvae
(
larvae
,
gettags
(
ctrl
),
gettags
(
ctrl
),
gettimestep
(
ctrl
));
gettimestep
(
ctrl
));
kwargs
...
)
kwargs
...
)
...
...
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