[DBG] more bug fix in neurodataset fm data-dev
[DBG] more bug fix in neurodataset fm data-dev
@@ -18,3 +18,14 @@ class DatasetFmri(DatasetBase):
"""
def __init__(self, rawdata=None,preprocess=preprocess_fmri):
measurements,descriptors,obs_descriptors,channel_descriptors=preprocess(rawdata)
+
+ if (measurements.ndim==2):
+ self.measurements = measurements
+ self.n_set = 1
+ self.n_obs,self.n_channel = self.measurements.shape
+ elif (measurements.ndim==3):
+ self.measurements = measurements
+ self.n_set,self.n_obs,self.n_channel = self.measurements.shape
+ self.descriptors = descriptors
+ self.obs_descriptors = obs_descriptors
+ self.channel_descriptors = channel_descriptors
