@io_hdf5.with_read_hdf5<EOL>def read_hdf5_segmentlist(h5f, path=None, gpstype=LIGOTimeGPS, **kwargs):
<EOL>dataset = io_hdf5.find_dataset(h5f, path=path)<EOL>segtable = Table.read(dataset, format='<STR_LIT>', **kwargs)<EOL>out = SegmentList()<EOL>for row in segtable:<EOL><INDENT>start = LIGOTimeGPS(int(row['<STR_LIT>']), int(row['<STR_LIT>']))<EOL>end = LIGOTimeGPS(int(row['<STR_LIT>']), int(row['<STR_LIT>']))<EOL>if gpstype is LIGOTimeGPS:<EOL><INDENT>out.append(Segment(start, end))<EOL><DEDENT>else:<EOL><INDENT>out.append(Segment(gpstype(start), gpstype(end)))<EOL><DEDENT><DEDENT>return out<EOL>
Read a `SegmentList` object from an HDF5 file or group.