Skip to content
Snippets Groups Projects

bugfix for direct call to new_write_larva_dataset_hdf5

Merged François LAURENT requested to merge dev into main
3 files
+ 4
4
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 2
2
@@ -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)
Loading