I think that I will remove the data option. It isn't really useful. If one
would want to insert data into a fif object, they can make an instance of
the raw and do it there. This should be kept as just a converter.

Does reshaping the data create another array or does it reshape in place. I
assume it doesn't since I am reassigning it. Any suggestions of
preallocating space and reshape the extracted data with having multiple
representations in memory?

Best,
--
Teon Brooks, Pre-hD
Graduate Student in psycholinguistics
Marantz Morph Lab
NSF Fellow
teon@nyu.edu



On Sat, Feb 16, 2013 at 10:57 AM, Christian Brodbeck <
notifications@github.com> wrote:

> In mne/fiff/kit/kit.py:
>
> > +                                 ch_names['STIM'])
> > +
> > +        logger.info
> ('Reading raw data from %s...' % input_fname)
> > +        if not data:
> > +            self._data = _get_sqd_data(rawfile=input_fname, sqd=sqd)
> > +        else:
> > +            self._data = data
> > +        assert len(self._data) == sqd['nchan']
> > +
> > +        # Create a synthetic channel
> > +        trig_chs = self._data[stim, :]
> > +        trig_chs = trig_chs > stimthresh
> > +        trig_vals = np.array(2 ** np.arange(len(stim)), ndmin=2).T
> > +        trig_chs = trig_chs * trig_vals
> > +        stim_ch = trig_chs.sum(axis=0)
> > +        self._data = np.vstack((self._data, stim_ch))
>
> Since vstack creates a new array, it might be more memory efficient for
> _get_sqd_data() to create an array with an empty last row, so that you
> could do here self._data[-1,:] = stim_ch. This messes up the handling of
> the data kwarg a bit, so I'm only suggesting that because you said you
> got to the limit in terms of memory...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mne-tools/mne-python/pull/366/files#r3039573>.
>
>