Merge Command
The merge command allows you to combine multiple trace files (e.g., clusters or chunks) into a single file.
Usage
icluto merge <file1> <file2> ... <fileN> <output_file>
Description
This command is robust enough to merge from 1 to N files. The primary requirement is that all input files must be of the same type (either all .npy or all .bin) and must contain traces of the same length.
- Input files: A list of paths to the files you want to merge.
- Output file: The path where the merged file will be saved.
Examples
Merging .npy files
If you have multiple .npy files containing trace arrays:
icluto merge cluster1.npy cluster2.npy cluster3.npy merged_clusters.npy
Merging .bin files
If you have binary trace files:
icluto merge data_part1.bin data_part2.bin full_data.bin
Behavior
- Dimension Check: The command verifies that all input traces have the same length (dimensionality). If they don't, the merge operation will fail with an error.
- Type Check: Mixing file types (e.g., merging a
.npyfile with a.binfile) is not supported and will result in an error.