KamitaniLab / GenericObjectDecoding

Demo code for Horikawa and Kamitani (2017) Generic decoding of seen and imagined objects using hierarchical visual features. Nat Commun https://www.nature.com/articles/ncomms15037.
150 stars 46 forks source link

num voxels of the data mismatch with config? #6

Closed qihongl closed 6 years ago

qihongl commented 6 years ago

I just have another quick question: Is this the correct way of extracting brain data from a particular ROI? If I run the following code, by checking the shape of X, the number of voxels in 'HVC' is 2049. However, according to the config file, num_voxel['HVC'] is 1000. Am I misunderstanding something?

import bdpy
import numpy as np 

subjects = config.subjects
rois = config.rois
num_voxel = config.num_voxel

sbj = 'Subject1'
roi = 'HVC'

data = bdpy.BData(subjects[sbj][0])
X = data.select(rois[roi])
print(np.shape(X)) 
print(num_voxel[roi])

Thank you very much in advance!

ShuntaroAoki commented 6 years ago

num_voxel in the config is the number of voxels selected for prediction analysis, not the number of voxels included in ROIs. In the analysis, we selected voxels showing the highest correlation with the target variable (visual features) in the training image sessions (500 voxels for V1-V4, LOC, and FFA, PPA; 1000 for LVC, HVC, and VC; please see 'ROI selection' in the original paper).

qihongl commented 6 years ago

I see! Thank you very much!