コード例 #1
0
def test_convolve_regressors():
    """
    tests for convolve_regressors helper function
    """
    conditions = [0, 1]
    onsets = [20, 40]
    paradigm =  dm.EventRelatedParadigm(conditions, onsets)
    # names not passed -> default names
    f, names = dm.convolve_regressors(paradigm, 'Canonical')
    yield assert_equal(names, ['c0', 'c1'])
コード例 #2
0
ファイル: DesignMatrix.py プロジェクト: yarikoptic/NiPy-OLD
 def set_conditions(self, hrfmodel="Canonical"):
     """ 
     Set the conditions of the model as a formula
     
     """
     if self.protocol == None:
        self.conditions = None
     else:
         self.conditions, self._names = convolve_regressors(self.protocol,
                                        hrfmodel, self._names)
コード例 #3
0
def test_convolve_regressors():
    # tests for convolve_regressors helper function
    paradigm = [[0, 20], [1, 40]]
    # names not passed -> default names
    f, names = convolve_regressors(paradigm, "Canonical")
    yield assert_equal(names, ["c0", "c1"])