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

version increment

parents eb45d139 1e50a107
No related branches found
No related tags found
No related merge requests found
Pipeline #94393 passed
name = "TaggingBackends"
uuid = "e551f703-3b82-4335-b341-d497b48d519b"
authors = ["François Laurent", "Institut Pasteur"]
version = "0.7"
version = "0.7.1"
[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
......
[tool.poetry]
name = "TaggingBackends"
version = "0.7"
version = "0.7.1"
description = "Backbone for LarvaTagger.jl tagging backends"
authors = ["François Laurent"]
......
......@@ -271,17 +271,18 @@ function write_larva_dataset_hdf5(path, counts, files, refs, nsteps_before, nste
end
end
h5open(path, "w") do h5
g = create_group(h5, "samples")
Threads.foreach(ch) do (file, refs, sampleid)
@info "Sampling series of spines in run: $(runid(file))"
processfile(h5, file, refs, sampleid, nsteps_before, nsteps_after;
processfile(g, file, refs, sampleid, nsteps_before, nsteps_after;
fixmwt=fixmwt, frameinterval=frameinterval)
end
attributes(h5["samples"])["n_samples"] = sampleid
attributes(g)["n_samples"] = sampleid
# extension
h5["labels"] = collect(keys(counts))
#h5["files"] = [f.source for f in files]
if !isnothing(frameinterval)
attributes(h5["samples"])["frame_interval"] = frameinterval
attributes(g)["frame_interval"] = frameinterval
end
end
end
......@@ -363,7 +364,7 @@ function processfile(h5, file, refs, sampleid, nsteps_before, nsteps_after;
sample[:,8] = lengths
sample[:,9:end] = spines
#
name = "samples/sample_$sampleid"
name = "sample_$sampleid"
# transpose for compatibility with h5py
# see issue https://github.com/JuliaIO/HDF5.jl/issues/785
h5[name] = permutedims(sample, reverse(1:ndims(sample)))
......@@ -517,9 +518,6 @@ function write_larva_dataset_hdf5(output_dir::String,
h5open(output_file, "cw") do h5
attributes(h5["samples"])["len_traj"] = window_length
attributes(h5["samples"])["len_pred"] = window_length
if !isnothing(frameinterval)
attributes(h5["samples"])["frame_interval"] = frameinterval
end
end
return output_file
end
......
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