import tables FILENAME = 'data_cq.h5' data = tables.open_file(FILENAME, 'a') from datetime import datetime from sapphire import download_coincidences download_coincidences(data, cluster='Science Park', start=datetime(2016, 1, 1), end=datetime(2016, 1, 2), n=3) data.close() from sapphire import CoincidenceQuery cq = CoincidenceQuery(FILENAME) STATIONS = [501, 510, 509] coincidences = cq.all(STATIONS, iterator=True) coincidence_events = cq.all_events(coincidences) for id, events in enumerate(coincidence_events): print("Coincidentie: %d" % id) for station, event in events: print("Station: %d. Event id: %d. Timestamp: %d" % (station, event['event_id'], event['ext_timestamp'])) cq.finish()