def _update_data(params):
    """Prepare the data on horizontal shift of the viewport."""
    sfreq = params['info']['sfreq']
    start = int((params['t_start'] - params['first_time']) * sfreq)
    end = int((params['t_start'] + params['duration']) * sfreq)
    params['data'] = params['orig_data'][:, start:end]
    params['times'] = params['raw'].times[start:end]
