code for converting binaries to h5py catalogs