def expect(params, time, unit, period, pr_inf, prev, curr):
    """
    Return the expected observation value :math:`\\mathbb{E}[y_t]` for every
    every particle :math:`x_t`, at one or more times :math:`t`.

    :param params: The observation model parameters.
    :param time: The simulation time(s).
    :param unit: The observation units (see classes in :py:module`data`).
    :type unit: str
    :param period: The duration of the observation period (in days).
    :type period: int
    :param pr_inf: The probability of an individual becoming infected during
        the observation period(s).
    :type pr_inf: float
    :param prev: The state vectors at the start of the observation period(s).
    :type prev: numpy.ndarray
    :param curr: The state vectors at the end of the observation period(s).
    :type curr: numpy.ndarray
    """
    if unit in params['obs']:
        op = params['obs'][unit]
        obs_model = op['obs_model']
        return obs_model.expect(params, op, time, period, pr_inf, prev, curr)
    else:
        raise ValueError("Unknown observation type '{}'".format(unit))
