def iacorr(data, t=None, n=None, norm=0, method='corr', count=None,
    chunk_size=None, thread_divisor=None, auto_background=False, viewer=
    None, viewer_interval=1, mode='full', mask=None, stats=True):
    """Iterative version of :func:`ccorr`
        
    Parameters
    ----------
    data : iterable
        An iterable object, iterating over single-frame ndarray data.
    t : int or array-like, optional
        Array of integers defining frame times of the data. If it is a scalar
        it defines the length of the input data
    n : int, optional
        Determines the length of the output (max time delay - 1 by default). 
    norm : int, optional
        Specifies normalization procedure 0,1,2, or 3 (default).
    method : str, optional
        Either 'fft', 'corr' or 'diff'. If not given it is chosen automatically based on 
        the rest of the input parameters.
    chunk_size : int
        Length of data chunk. 
    count : int, optional
        If given, it defines how many elements of the data to process. If not given,
        count is set to len(t1) if that is not specified, it is set to len(data).  
    thread_divisor : int, optional
        If specified, input frame is reshaped to 2D with first axis of length
        specified with the argument. It defines how many treads are run. This
        must be a divisor of the total size of the frame. Using this may speed 
        up computation in some cases because of better memory alignment and
        cache sizing.
    auto_background : bool
        Whether to use data from first chunk to calculate and subtract background.
    viewer : any, optional
        You can use :class:`.viewer.MultitauViewer` to display data.
    viewer_interval : int, optional
        A positive integer, defines how frequently are plots updated 1 for most 
        frequent, higher numbers for less frequent updates. 
    mode : str
        Either "full" or "partial". With mode = "full", output of this function 
        is identical to the output of :func:`ccorr_multi`. With mode = "partial", 
        cross correlation between neigbouring chunks is not computed.
    mask : ndarray, optional
        If specifed, computation is done only over elements specified by the mask.
        The rest of elements are not computed, np.nan values are written to output
        arrays.
    stats : bool
        Whether to return stats as well.
        
    Returns
    -------
    acorr_data, bg, var : acorr_type, ndarray, ndarray
        Acorr data, background and variance data. See :func:`acorr` for definition 
        of acorr_type
    acorr_data : acorr_type
        If `stats` == False
    """
    period = 1
    nlevel = 0
    from cddm.multitau import _compute_multi_iter, _VIEWERS
    for i, mdata in enumerate(_compute_multi_iter(data, t, period=period,
        level_size=n, chunk_size=chunk_size, method=method, count=count,
        auto_background=auto_background, nlevel=nlevel, norm=norm,
        thread_divisor=thread_divisor, mode=mode, mask=mask, stats=stats,
        cross=False)):
        if stats == True:
            (data, dummy), bg, var = mdata
        else:
            data, dummy = mdata
        if viewer is not None:
            if i == 0:
                _VIEWERS['acorr'] = viewer
            if i % viewer_interval == 0:
                if stats == True:
                    viewer.set_data(data, background=bg, variance=var)
                    viewer.plot()
                else:
                    viewer.set_data(data)
                    viewer.plot()
    if stats == True:
        return data, bg, var
    else:
        return data
