import h5py # open trigger file fname = 'O2_triggers_pycbc.hdf5' trigger_set = h5py.File(fname, 'r') # print the properties of the most significant triggers print('Properties of most significant triggers in file {0}'.format(fname)) for i, far in enumerate(trigger_set['false_alarm_rate']): # only consider triggers with false alarm rate < 1/year if far < 1.0: print('') print('Trigger number {0}:'.format(i)) # print all the properties of the found triggers for key in trigger_set.keys(): print('... {0}: {1}'.format(key, trigger_set[key][i]))