def to_pyrocko_events(catalog):
    """
    Convert ObsPy catalog object to list of Pyrocko event objects.

    :param catalog:
        :py:class:`obspy.Catalog <obspy.core.event.Catalog>` object
    :returns:
        list of :py:class:`pyrocko.model.Event` objects or ``None`` if catalog
        is ``None``
    """
    obspy_catalog = catalog
    if obspy_catalog is None:
        return None
    from pyrocko import model
    events = []
    for obspy_event in obspy_catalog:
        for origin in obspy_event.origins:
            events.append(model.Event(name='%s-%s' % (obspy_event.
                resource_id, origin.resource_id), time=origin.time.
                timestamp, lat=origin.latitude, lon=origin.longitude, depth
                =origin.depth, region=origin.region))
    return events
