Пример #1
0
    def __init__(self, contrasts={'dummy_contrast_example':'3*audio-video/3'},
                 contrast_test_baseline=0.0,
                 hrf_model='Canonical', drift_model='Cosine', hfcut=128.,
                 residuals_model='spherical',fit_method='ols',
                 outputPrefix='glm_', rescale_results=False,
                 rescale_factor_file='', fir_delays=[0]):

        FMRIAnalyser.__init__(self, outputPrefix)
        xmlio.XMLable2.__init__(self)


        self.hrf_model = hrf_model
        self.drift_model = drift_model
        self.fir_delays = fir_delays
        self.hfcut = hfcut
        self.residuals_model = residuals_model
        self.fit_method = fit_method
        self.contrasts = contrasts
        self.contrasts.pop('dummy_contrast_example',None)
        self.con_bl = contrast_test_baseline
        self.rescale_results = rescale_results

        if rescale_factor_file != '':
            self.rescale_factor = xndarray.load(rescale_factor_file).data
        else:
            self.rescale_factor = None
Пример #2
0
    def __init__(self,
                 contrasts={'dummy_contrast_example': '3*audio-video/3'},
                 contrast_test_baseline=0.0,
                 hrf_model='Canonical',
                 drift_model='Cosine',
                 hfcut=128.,
                 residuals_model='spherical',
                 fit_method='ols',
                 outputPrefix='glm_',
                 rescale_results=False,
                 rescale_factor_file=None,
                 fir_delays=[0],
                 output_fit=False):

        xmlio.XmlInitable.__init__(self)
        FMRIAnalyser.__init__(self, outputPrefix)

        self.output_fit = output_fit
        self.hrf_model = hrf_model
        self.drift_model = drift_model
        self.fir_delays = fir_delays
        self.hfcut = hfcut
        self.residuals_model = residuals_model
        self.fit_method = fit_method
        self.contrasts = contrasts
        self.contrasts.pop('dummy_contrast_example', None)
        self.con_bl = contrast_test_baseline
        self.rescale_results = rescale_results

        if rescale_factor_file is not None:
            self.rescale_factor = xndarray.load(rescale_factor_file).data
        else:
            self.rescale_factor = None
Пример #3
0
Файл: jde.py Проект: pyhrf/pyhrf
        def handle_mask(self, mask_file, bold_files, tr, onsets, durations, output_dir, mesh_file=None):

            if mesh_file is None:  # Volumic
                if self.force_input_parcellation:
                    if not op.exists(mask_file):
                        raise IOError("Input parcellation is forced but " "mask file %s not found" % mask_file)
                    else:
                        # TODO: check if n-ary
                        return mask_file

                FMRIAnalyser.handle_mask(self, mask_file, bold_files, onsets, durations, mesh_file)

                mask, mask_obj = read_volume(mask_file)
                roi_ids = np.unique(mask)
                if len(roi_ids) <= 2:
                    glm_output_dir = op.join(output_dir, "GLM")
                    if not op.exists(glm_output_dir):
                        os.makedirs(glm_output_dir)
                    return glm_parcellation(bold_file, tr)
Пример #4
0
        def handle_mask(self, mask_file, bold_files, tr,
                        onsets, durations, output_dir, mesh_file=None):

            if mesh_file is None:  # Volumic
                if self.force_input_parcellation:
                    if not op.exists(mask_file):
                        raise IOError("Input parcellation is forced but "
                                      "mask file %s not found" % mask_file)
                    else:
                        # TODO: check if n-ary
                        return mask_file

                FMRIAnalyser.handle_mask(self, mask_file, bold_files, onsets,
                                         durations, mesh_file)

                mask, mask_obj = read_volume(mask_file)
                roi_ids = np.unique(mask)
                if len(roi_ids) <= 2:
                    glm_output_dir = op.join(output_dir, 'GLM')
                    if not op.exists(glm_output_dir):
                        os.makedirs(glm_output_dir)
                    return glm_parcellation(bold_file, tr)
Пример #5
0
    def __init__(self, HrfEstimator=RFIREstim(), outputPrefix='hrf_'):
        xmlio.XmlInitable.__init__(self)
        FMRIAnalyser.__init__(self, outputPrefix='rfir_')

        self.hEstimator = HrfEstimator
Пример #6
0
    def __init__(self, HrfEstimator=RFIREstim(), outputPrefix='hrf_'):
        xmlio.XmlInitable.__init__(self)
        FMRIAnalyser.__init__(self, outputPrefix='rfir_')

        self.hEstimator = HrfEstimator
Пример #7
0
 def __init__(self, outputPrefix="glm_"):
     FMRIAnalyser.__init__(self, outputPrefix)
Пример #8
0
 def __init__(self, HrfEstimator=RFIREstim(), outputPrefix="hrf_"):
     FMRIAnalyser.__init__(self, outputPrefix="rfir_")
     xmlio.XMLable2.__init__(self)
     self.hEstimator = HrfEstimator
Пример #9
0
 def __init__(self, outputPrefix='jde_', pass_error=True):
     FMRIAnalyser.__init__(self, outputPrefix, pass_error=pass_error)
Пример #10
0
 def __init__(self, outputPrefix='glm_'):
     FMRIAnalyser.__init__(self, outputPrefix)
Пример #11
0
 def __init__(self, outputPrefix='jde_', pass_error=True):
     FMRIAnalyser.__init__(self, outputPrefix, pass_error=pass_error)
Пример #12
0
 def __init__(self, outputPrefix='glm_'):
     FMRIAnalyser.__init__(self, outputPrefix)