'Estimate sources given the unmixing matrix.
This method will return the sources in the container format passed.
Typical usecases:
1. pass Raw object to use `raw.plot` for ICA sources
2. pass Epochs object to compute trial-based statistics in ICA space
3. pass Evoked object to investigate time-locking in ICA space
Parameters
inst : instance of Raw, Epochs or Evoked
Object to compute sources from and to represent sources in.
add_channels : None | list of str
Additional channels  to be added. Useful to e.g. compare sources
with some reference. Defaults to None
start : int | float | None
First sample to include. If float, data will be interpreted as
time in seconds. If None, the entire data will be used.
stop : int | float | None
Last sample to not include. If float, data will be interpreted as
time in seconds. If None, the entire data will be used.
Returns
sources : instance of Raw, Epochs or Evoked
The ICA sources time series.'

def get_sources(self, inst, add_channels=None, start=None, stop=None):

    if isinstance(inst, BaseRaw):
        sources = self._sources_as_raw(inst, add_channels, start, stop)
    elif isinstance(inst, BaseEpochs):
        sources = self._sources_as_epochs(inst, add_channels, False)
    elif isinstance(inst, Evoked):
        sources = self._sources_as_evoked(inst, add_channels)
    else:
        raise ValueError('Data    input    must    be    of    Raw,    Epochs    or    Evoked    type')
    return sources
