Example #1
0
    def test_rfir_on_small_simulation(self):
        """ Check if pyhrf.rfir runs properly and that returned outputs
        contains the expected items """
        fdata = simu.create_small_bold_simulation()
        outputs = rfir(fdata, nb_its_max=2)

        assert isinstance(outputs, dict)
        for k in ["fir", "fir_error", "fit", "drift"]:
            assert outputs.has_key(k)
Example #2
0
    def test_rfir_on_small_simulation(self):
        """ Check if pyhrf.rfir runs properly and that returned outputs
        contains the expected items """
        fdata = simu.create_small_bold_simulation()
        outputs = rfir(fdata, nb_its_max=2)

        assert isinstance(outputs, dict)
        for k in ["fir", "fir_error", "fit", "drift"]:
            assert outputs.has_key(k)
Example #3
0
    def test_results_small_simulation(self):
        """

        TODO: move to validation
        """
        #output_dir = pyhrf.get_tmp_path()
        output_dir = './'

        fdata = simu.create_small_bold_simulation(output_dir=output_dir)

        pyhrf.verbose.set_verbosity(0)
        outputs = rfir(fdata, nb_its_max=500, nb_its_min=100)

        m = fdata.roiMask
        for k,o in outputs.iteritems():
            output_fn = op.join(output_dir, k + '.nii')
            o.expand(m, "voxel", target_axes=MRI3Daxes).save(output_fn)
Example #4
0
    def test_results_small_simulation(self):
        """

        TODO: move to validation
        """
        #output_dir = pyhrf.get_tmp_path()
        output_dir = './'

        fdata = simu.create_small_bold_simulation(output_dir=output_dir)

        # pyhrf.verbose.set_verbosity(0)
        pyhrf.logger.setLevel(logging.WARNING)
        outputs = rfir(fdata, nb_its_max=500, nb_its_min=100)

        m = fdata.roiMask
        for k,o in outputs.iteritems():
            output_fn = op.join(output_dir, k + '.nii')
            o.expand(m, "voxel", target_axes=MRI3Daxes).save(output_fn)