Rank defficient error

11 views
Skip to first unread message

annib

unread,
May 7, 2009, 5:16:13 AM5/7/09
to GCVA
I'm getting this weird error after the program loads all the image
files in. I enter the txt file with the list of 82 images.

Checking rank of image array
The rank is 81
Warning: with a total of 82 images. the target image array is rank
defficient


How the hell did that happen. The images are all fine. I've quite out
of Matlab and run it again a number of times and keep getting the same
thing.

thanks
Anna

Christian Habeck

unread,
May 7, 2009, 11:49:48 AM5/7/09
to gc...@googlegroups.com
Hi Anna,

let's just check that there are no duplications of any files. I always
check it in the following way:

Compute correlation matrix between all scans and see whether any off
diagonal elements are 1.00. These scans then would be identical and
duplicated.

If there is a *.mat file I can also grab and quickly look at this myself.


bests - Chris
--
Christian Habeck
ch...@columbia.edu
http://www.cumc.columbia.edu/dept/sergievsky/cnd/habeck.html

annib

unread,
May 7, 2009, 1:13:03 PM5/7/09
to GCVA
Good point I'll check that now.
Anna

annib

unread,
May 7, 2009, 1:47:57 PM5/7/09
to GCVA
OK so which matrix do I use to do the correlation matrix is it the
target_images(902629x82) one?

and then what? because when I do corrcoef of this matrix I don't see
any off diagonal 1.00's but its not that easy to see just by
scrolling.

I'd send you a .mat file but PCA_suite_f refuses to write one when it
encounters that error.

thanks
Anna

On May 7, 4:49 pm, Christian Habeck <chab...@gmail.com> wrote:

Christian Habeck

unread,
May 7, 2009, 1:51:33 PM5/7/09
to gc...@googlegroups.com
alright do the following:

bin_mat=corrcoef(target_images)>0.9999;

sum(bin_mat,1)


Now you should get a row vector

1 1 1 1 1 1 1 1 1 1 1 1


If there is a 2 in 2 places, you know these scans are perfectly correlated. For instance, if you had 4 scans only and this operation would yield

2 1 1 2

You know scan 1 and 4 are identical.


Chris

annib

unread,
May 7, 2009, 1:51:57 PM5/7/09
to GCVA
Ignore previous message. Easiest way is to open the correlation matrix
into the GUI :) and just read off the cell number!!! And yes I found
it.

thanks
Anna

On May 7, 4:49 pm, Christian Habeck <chab...@gmail.com> wrote:

Christian Habeck

unread,
May 7, 2009, 1:52:35 PM5/7/09
to gc...@googlegroups.com
Eureka! I love linear algebra.

annib

unread,
May 8, 2009, 6:08:34 AM5/8/09
to GCVA
One final note to all of this. Turns out I made a duplicate right back
at the beginning of the analysis so this means that even my previous
analyses were wrong. Why didn't I get an error before? Well I was
using the non-linear FSL registration algorithm which having been run
twice on the same image seemingly gave slightly different results,
different enough that the PCA_suite_f #2 check didn't pick it up.

Anyway I thought it was an interesting observation of FSL FNIRT.

Cheers cheers cheers
Anna

annib

unread,
May 8, 2009, 6:09:49 AM5/8/09
to GCVA
oh and the second time I ran it it was on the linear version; FSL
FLIRT so it gave exactly the same result.

Christian Habeck

unread,
May 8, 2009, 7:38:52 AM5/8/09
to gc...@googlegroups.com
Alright! Maybe we could report even suspiciously high correlations
between images?
--
Sent from my mobile device
Reply all
Reply to author
Forward
0 new messages