def get_catalog(detections):
catalog = Catalog()<EOL>for detection in detections:<EOL><INDENT>if detection.event:<EOL><INDENT>catalog.append(detection.event)<EOL><DEDENT><DEDENT>return catalog<EOL>
Generate an :class:`obspy.core.event.Catalog` from list of \
:class:`Detection`'s.

:type detections: list
:param detections: list of :class:`eqcorrscan.core.match_filter.Detection`

:returns: Catalog of detected events.
:rtype: :class:`obspy.core.event.Catalog`

.. warning::
    Will only work if the detections have an event associated with them.
    This will not be the case if detections have been written to csv
    format using :func:`eqcorrscan.core.match_filter.Detection.write`
    and read back in.