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

Merge branch 'dev' into 'main'

bugfix for direct call to new_write_larva_dataset_hdf5

See merge request !4
parents 377bf405 7abe9f54
No related branches found
No related tags found
1 merge request!4bugfix for direct call to new_write_larva_dataset_hdf5
Pipeline #109991 passed
name = "TaggingBackends" name = "TaggingBackends"
uuid = "e551f703-3b82-4335-b341-d497b48d519b" uuid = "e551f703-3b82-4335-b341-d497b48d519b"
authors = ["François Laurent", "Institut Pasteur"] authors = ["François Laurent", "Institut Pasteur"]
version = "0.15" version = "0.15.1"
[deps] [deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
......
[tool.poetry] [tool.poetry]
name = "TaggingBackends" name = "TaggingBackends"
version = "0.15" version = "0.15.1"
description = "Backbone for LarvaTagger.jl tagging backends" description = "Backbone for LarvaTagger.jl tagging backends"
authors = ["François Laurent"] authors = ["François Laurent"]
......
...@@ -540,7 +540,7 @@ Known issue: ASCII-compatible string attributes are ASCII encoded and deserializ ...@@ -540,7 +540,7 @@ Known issue: ASCII-compatible string attributes are ASCII encoded and deserializ
by the *h5py* Python library. by the *h5py* Python library.
""" """
function write_larva_dataset_hdf5(output_dir::String, function write_larva_dataset_hdf5(output_dir::String,
input_data::Union{String, <:AbstractVector}, input_data::Union{Repository, String, <:AbstractVector},
window_length::Int=20; window_length::Int=20;
labels::Union{Nothing, <:AbstractVector{String}}=nothing, labels::Union{Nothing, <:AbstractVector{String}}=nothing,
labelpointers::Union{Nothing, <:AbstractDict{String, Vector{Tuple{Int, Int, Int}}}}=nothing, labelpointers::Union{Nothing, <:AbstractDict{String, Vector{Tuple{Int, Int, Int}}}}=nothing,
...@@ -619,7 +619,7 @@ function new_write_larva_dataset_hdf5(output_dir, input_data; ...@@ -619,7 +619,7 @@ function new_write_larva_dataset_hdf5(output_dir, input_data;
@assert !isnothing(frameinterval) @assert !isnothing(frameinterval)
window = TimeWindow(window_length * frameinterval, round(Int, 1 / frameinterval); window = TimeWindow(window_length * frameinterval, round(Int, 1 / frameinterval);
maggotuba_compatibility=past_future_extensions) maggotuba_compatibility=past_future_extensions)
index = if startswith(balancing_strategy, "max:") index = if !isnothing(balancing_strategy) && startswith(balancing_strategy, "max:")
# `includeall` not supported # `includeall` not supported
maxcount = parse(Int, balancing_strategy[5:end]) maxcount = parse(Int, balancing_strategy[5:end])
capacitysampling(labels, maxcount; seed=seed) capacitysampling(labels, maxcount; seed=seed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment