'Aux method.'

def _transform_epochs(self, epochs, concatenate):

    if (not hasattr(self, 'mixing_matrix_')):
        raise RuntimeError('No    fit    available.    Please    fit    ICA')
    picks = pick_types(epochs.info, include=self.ch_names, exclude='bads', meg=False, ref_meg=False)
    if (len(picks) != len(self.ch_names)):
        raise RuntimeError(("Epochs    don't    match    fitted    data:    %i    channels    fitted    but    %i    channels    supplied.    \nPlease    provide    Epochs    compatible    with    ica.ch_names" % (len(self.ch_names), len(picks))))
    data = np.hstack(epochs.get_data()[:, picks])
    (data, _) = self._pre_whiten(data, epochs.info, picks)
    sources = self._transform(data)
    if (not concatenate):
        sources = np.array(np.split(sources, len(epochs.events), 1))
    return sources
