Skip to content
Snippets Groups Projects
Commit 704025ba authored by François  LAURENT's avatar François LAURENT
Browse files

fixes #16

parent b9cbb9a2
No related branches found
No related tags found
No related merge requests found
Pipeline #91923 passed
module LarvaDatasets module LarvaDatasets
""" Generate *larva_dataset hdf5* files as introduced by MaggotUBA. """ Generate *larva_dataset* hdf5 files as introduced by MaggotUBA.
This module exposes the default implementation and proceeds in 3 steps: This module exposes the default implementation and proceeds in 3 steps:
...@@ -77,11 +77,12 @@ function labelcounts(files, headlength=nothing, taillength=nothing; ...@@ -77,11 +77,12 @@ function labelcounts(files, headlength=nothing, taillength=nothing;
return return
end end
for (j, track) in enumerate(values(run)) for (j, track) in enumerate(values(run))
timestamps = track.timestamps
track = track[:labels] track = track[:labels]
lock(c) lock(c)
try try
for k in headlength+1:length(track)-taillength for k in headlength+1:length(track)-taillength
t = track.timestamps[k] t = timestamps[k]
tags = track[k] tags = track[k]
isnothing(selection_rule) || selection_rule(file.source, track.id, t, tags) || continue isnothing(selection_rule) || selection_rule(file.source, track.id, t, tags) || continue
for label in (tags isa Vector ? tags : [tags]) for label in (tags isa Vector ? tags : [tags])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment