'Return last n_samples from current time.
Parameters
n_samples : int
Number of samples to fetch.
picks : array-like of int | None
If None all channels are kept
otherwise the channels indices in picks are kept.
Returns
epoch : instance of Epochs
The samples fetched as an Epochs object.
See Also
mne.Epochs.iter_evoked'

def get_data_as_epoch(self, n_samples=1024, picks=None):

    ft_header = self.ft_client.getHeader()
    last_samp = (ft_header.nSamples - 1)
    start = ((last_samp - n_samples) + 1)
    stop = last_samp
    events = np.expand_dims(np.array([start, 1, 1]), axis=0)
    data = self.ft_client.getData([start, stop]).transpose()
    info = self.info
    if (picks is not None):
        info = pick_info(info, picks)
    else:
        picks = range(info['nchan'])
    epoch = EpochsArray(data[picks][np.newaxis], info, events)
    return epoch
