def write_hdf5_segmentlist(seglist, output, path=None, **kwargs):
if path is None:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>data = numpy.zeros((len(seglist), <NUM_LIT:4>), dtype=int)<EOL>for i, seg in enumerate(seglist):<EOL><INDENT>start, end = map(LIGOTimeGPS, seg)<EOL>data[i, :] = (start.gpsSeconds, start.gpsNanoSeconds,<EOL>end.gpsSeconds, end.gpsNanoSeconds)<EOL><DEDENT>segtable = Table(data, names=['<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>'])<EOL>return segtable.write(output, path=path, format='<STR_LIT>', **kwargs)<EOL>
Write a `SegmentList` to an HDF5 file/group

    Parameters
    ----------
    seglist : :class:`~ligo.segments.segmentlist`
        data to write

    output : `str`, `h5py.File`, `h5py.Group`
        filename or HDF5 object to write to

    path : `str`
        path to which to write inside the HDF5 file, relative to ``output``

    **kwargs
        other keyword arguments are passed to
        :meth:`~astropy.table.Table.write`