Hello
What is the proper way to merge the origins, magnitudes (and all other elements if possible) of two events coming from different 2 catalogs. And how to define manually the preferred [origin, magnitude, etc] to pick between the two versions ?
Say, I would like to add all origins and preferred origin of [event j, catalog_2] to a copy of [event i, catalog_1] I have made some experiments using :
merges = obspy.core.event.catalog.Catalog()
merges.events.append(catalog_1.events[ i ])
for elt in catalog_2.events[ j ].origins:
merges.events[-1].origins.append(elt)
merges.events[-1].preferred_origin_id = catalog_2.events[ j ].preferred_origin_id
But I feel like going the wrong way… should I use the Event.update method ? If yes, how ?
Regards
Fred
◸Fr****édérick Massin +41 44 63 - 38276 | Git | Blog | Publications.