finished implementing new function combine_hdr_catalogs