mbtrack2.tracking.monitors.tools module¶
This module defines utilities functions, helping to deals with tracking output and hdf5 files.
- merge_files(files_prefix: str, files_number: int, start_idx: int = 0, file_name: str | None = None)[source]¶
Merge several hdf5 files into one.
The function assumes that the files to merge have names in the follwing format:
“files_prefix_0.hdf5”
“files_prefix_1.hdf5”
… - “files_prefix_files_number.hdf5”
Parameters¶
- files_prefixstr
Name of the files to merge.
- files_numberint
Number of files to merge.
- start_idxint, optional
Start index of the hdf5 files.
- file_namestr, optional
Name of the file with the merged data. If None, files_prefix without number is used.
- copy_files(source: str, copy: str, version: str | None = None)[source]¶
Copy a source hdf5 file into another hdf5 file using a different HDF5 version.
The function assumes that the source file has only a single group layer.
Parameters¶
- sourcestr
Name of the source file.
- copystr
Name of the copy file.
- versionstr, optional
Version number of the copy file.