View Contents of a GWOSC HDF5 file
Option 1: Use HDFView
A helpful, free software for viewing the structure of an HDF5 file is the HDFView tool, which can be downloaded from the HDF Group web site.
This will give you an interactive display of a GWOSC data file.
Option 2: Use a short Python script
Alternatively, you can write a short python script for viewing the structure of a GWOSC data file like this:
import h5py
def dump_info(name, obj):
print "{0} :".format(name)
try:
print " .value: {0}".format(obj.value)
for key in obj.attrs.keys():
print " .attrs[{0}]: {1}".format(key, obj.attrs[key])
except:
pass
filename = 'H-H1_LOSC_4_V1-842711040-4096.hdf5'
file = h5py.File(filename)
file.visititems(dump_info)
This will present output like this:
meta : meta/Description : .value: Strain data time series from GWOSC meta/DescriptionURL : .value: https://gw-openscience.org/ meta/Detector : .value: H1 meta/Duration : .value: 4096 meta/GPSstart : .value: 842711040 meta/Observatory : .value: H meta/Type : .value: StrainTimeSeries meta/UTCstart : .value: 2006-09-19T14:23:46 quality : quality/detail : quality/injections : quality/injections/InjDescriptions : .value: ['PEM injection' 'Hardware injection active' 'CBC hardware injection active' 'Burst hardware injection active' 'Stochastic group injection active' 'CW injection active'] quality/injections/InjShortnames : .value: ['PEM' 'HW' 'HW_CBC' 'HW_BURST' 'HW_STOCH' 'CW'] quality/injections/Injmask : .value: [0 0 0 ..., 0 0 0] .attrs[Bits]: 6 .attrs[Description]: A bitmask encoded as an integer-valued timeseries. The first "Bits" bits might be used, for each there is an entry in "Bits", "Shortnames", "Descriptions", one for each bit. .attrs[Npoints]: 4096 .attrs[Xunits]: second .attrs[Xlabel]: GPS time .attrs[Xstart]: 842711040 .attrs[Xspacing]: 1.0 .attrs[Ylabel]: Injmask quality/simple : quality/simple/DQDescriptions : .value: ['Science data present' 'Category-1 checks passed for CBC high-mass search' 'Category-2 and 1 checks passed for CBC high-mass search' 'Category-3 and 2 and 1 checks passed for CBC high-mass search' 'Category-4,3,2,1 checks passed for CBC high-mass search' 'Category-1 checks passed for CBC low-mass search' 'Category-2 and 1 checks passed for CBC low-mass search' 'Category-3 and 2 and 1 checks passed for CBC low-mass search' 'Category-4, veto active for CBC low-mass search' 'Category-1 checks passed for burst search' 'Category-2 and 1 checks passed for burst search' 'Category-3 and 2 and 1 checks passed for burst search' 'Category-2E and 1 subsecond-event checks passed for burst search' 'Category-3E, 2E, 1 subsecond-event checks passed for burst search' 'Category-1 checks passed for continuous-wave search' 'Category-1 checks passed for stochastic search' 'Category-2 and 1 checks passed for stochastic search, H1-L1 combination' 'Category-2 and 1 checks passed for stochastic search, H2-L1 combination'] quality/simple/DQShortnames : .value: ['DATA' 'CBCHIGH_CAT1' 'CBCHIGH_CAT2' 'CBCHIGH_CAT3' 'CBCHIGH_CAT4' 'CBCLOW_CAT1' 'CBCLOW_CAT2' 'CBCLOW_CAT3' 'CBCLOW_CAT4' 'BURST_CAT1' 'BURST_CAT2' 'BURST_CAT3' 'BURST_CAT2E' 'BURST_CAT3E' 'CW_CAT1' 'STOCH_CAT1' 'STOCH_CAT2_H1L1' 'STOCH_CAT2_H2L1'] quality/simple/DQmask : .value: [65535 65535 65535 ..., 0 0 0] .attrs[Bits]: 18 .attrs[Description]: A bitmask encoded as an integer-valued timeseries. The first "Bits" bits might be used, for each there is an entry in "Bits", "Shortnames", "Descriptions", one for each bit. .attrs[Npoints]: 4096 .attrs[Xunits]: second .attrs[Xlabel]: GPS time .attrs[Xstart]: 842711040 .attrs[Xspacing]: 1.0 .attrs[Ylabel]: DQmask strain : strain/Strain : .value: [ 1.07601499e-16 1.06790256e-16 1.05878874e-16 ..., nan nan nan] .attrs[Npoints]: 16777216 .attrs[Xunits]: second .attrs[Xlabel]: GPS time .attrs[Xspacing]: 0.000244140625 .attrs[Xstart]: 842711040 .attrs[Yunits]: .attrs[Ylabel]: Strain