#!/home/conda/feedstock_root/build_artifacts/bld/rattler-build_gstlal-ugly_1767612080/host_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/bin/python
import sys
import numpy
import argparse
import h5py


parser = argparse.ArgumentParser()
parser.add_argument("--out-h5-file", required = True, help = "provide the output hdf5 file name")
parser.add_argument("infile", nargs="+", help = "provide the output hdf5 file name")

args = parser.parse_args()

output = []
for f in args.infile:
	h5f = h5py.File(f, 'r')
	output += list(numpy.array(h5f["overlaps"])) 
output = numpy.array(output)
h5f = h5py.File(args.out_h5_file, 'w')
h5f.create_dataset('overlaps', data = output)
h5f.close()
