compute_proj_raw raised 'LinAlgError - SVD did not converge'

Hello all,

I am attempting to use compute_proj_raw (
http://martinos.org/mne/stable/generated/mne.compute_proj_raw.html?highlight=compute_proj_raw#mne.compute_proj_raw
)

However, when I run the program I get the following error:
https://gist.github.com/howarth/ae6289878337cb30af84

This is from the stable version of mnepython using 'pip install mne' which
was done a few weeks ago.

Thanks!
Dan Howarth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141117/9ca35bf0/attachment.html

hi Dan,

on what data did you apply this function?

how did you install python+numpy+scipy?

Alex

In our lab we take a 'empty room' recording in which we turn on the MEG
scanner when no one is in the room in order to further characterize the
noise.

I haven't had a problem in the past with this function, but for some reason
its not working for some subjects and working for others.

Here's the pipeline of the data:

max filter -> band pass 1-150 > notch filter 60, 120 > then I compute the
proj

Python was installed on my ubuntu machine. I use virtualenv

I used pip to install everything.

scipy: 0.14.0
numpy: 1.9.1

Unfortunately this is likely due to a bug in LAPACK:

https://github.com/scipy/scipy/issues/3868

You could try updating LAPACK, using `python-scipy` and `python-numpy` from
the Ubuntu repos, or possibly using Anaconda instead of the system Python.
Although it's ugly, it also works sometimes to just tweak the inputs a tiny
(seemingly trivial) amount, e.g. by including/excluding one extra time
point or epoch in calculations.

Eric

I tried using Anaconda but that didn't work out either.

I found something interesting here:
http://stackoverflow.com/questions/23533144/numpy-linalg-linalg-linalgerror-svd-did-not-converge

Would it be possible that the 'weights' are negative?

I should also note that I do not get this problem with the file if I try to
do the projection before I band pass and notch filter. Could band passing
and notch filtering before performing the computation result in a situation
in which the 'weight matrix' (I have no idea what that is reffering to in
this context) has negatives?

There shouldn't be any NaNs in the data (and I thought scipy/numpy checked
for this anyway), so I'd be surprised if it were the same issue. If you're
feeling adventurous you could do "import pdb; pdb.pm()" and then use pdb
commands to debug the issue a little bit. Given that this will probably
required a bit of back-and-forth, I'd suggest opening an mne-python issue
so we can interact without burdening the mne-analysis listserv.

Eric

Dan,

it you need put the file somewhere with a script so we can help.

Alex