Ejemplo n.º 1
0
roi_files = model_csv.func_outdir + \
                "/func/bandpass_freqs_0.01.0.1/rois_random_k3200.nii.gz"
roi_files.to_csv(outfile, index=False, sep=" ")

outfile = config.glm['infuncs2']
func_files = model_csv.func_outdir + \
                "/func/bandpass_freqs_0.01.0.1/functional_mni_4mm.nii.gz"
func_files.to_csv(outfile, index=False, sep=" ")

## Run glm
# output directory
base_glm = path.dirname(config.data['glm_dir'])
if not path.exists(base_glm):
    os.mkdir(base_glm)
# ok now run
glm = GlmRun(**config.glm)
glm.run()

## Summarize
## Goal: To easily represent the 4D GLM results (2D matrix) as 3D (1D vector)
##       for easy visualization and comparison

# output directory
summarize_out = config.summarize['out_dir']
if not path.exists(summarize_out):
    os.mkdir(summarize_out)

# get args
arg_order = ["regressors", "mask", "rois", "tvals", "out_dir"]
args = [config.summarize[arg] for arg in arg_order]
arg3 = ""
Ejemplo n.º 2
0
    config_file = "config_%s.yml" % scan
    config = YamlReader(config_file)
    config.compile()

    ## Create Model/Contrasts
    model = GlmModel(**config.model)
    model.run()  # still not spitting out the stdout in real-time
    model.save()

    ## Run glm
    # output directory
    base_glm = path.dirname(config.data['glm_dir'])
    if not path.exists(base_glm):
        os.mkdir(base_glm)
    # ok now run
    glm = GlmRun(**config.glm)  # NOTE: this doesn't really work right now,
    glm.run()  #       do this step manually

    ## Summarize
    ## Goal: To easily represent the 4D GLM results (2D matrix) as 3D (1D vector)
    ##       for easy visualization and comparison

    # output directory
    summarize_out = config.summarize['out_dir']
    if not path.exists(summarize_out):
        os.mkdir(summarize_out)

    # get args
    arg_order = ["regressors", "mask", "tvals", "out_dir"]
    args = [config.summarize[arg] for arg in arg_order]
    arg3 = ""
Ejemplo n.º 3
0
 config_file = "config_%s.yml" % scan
 config = YamlReader(config_file)
 config.compile()
 
 ## Create Model/Contrasts
 model = GlmModel(**config.model)
 model.run() # still not spitting out the stdout in real-time
 model.save()
 
 ## Run glm
 # output directory
 base_glm = path.dirname(config.data['glm_dir'])
 if not path.exists(base_glm):
     os.mkdir(base_glm)
 # ok now run
 glm = GlmRun(**config.glm)  # NOTE: this doesn't really work right now, 
 glm.run()                   #       do this step manually
 
 ## Summarize
 ## Goal: To easily represent the 4D GLM results (2D matrix) as 3D (1D vector) 
 ##       for easy visualization and comparison
 
 # output directory
 summarize_out = config.summarize['out_dir']
 if not path.exists(summarize_out):
     os.mkdir(summarize_out)
 
 # get args
 arg_order = ["regressors", "mask", "tvals", "out_dir"]
 args = [ config.summarize[arg] for arg in arg_order ]
 arg3 = ""
Ejemplo n.º 4
0
                "/func/bandpass_freqs_0.01.0.1/rois_random_k3200.nii.gz"
roi_files.to_csv(outfile, index=False, sep=" ")

outfile = config.glm['infuncs2']
func_files = model_csv.func_outdir + \
                "/func/bandpass_freqs_0.01.0.1/functional_mni_4mm.nii.gz"
func_files.to_csv(outfile, index=False, sep=" ")


## Run glm
# output directory
base_glm = path.dirname(config.data['glm_dir'])
if not path.exists(base_glm):
    os.mkdir(base_glm)
# ok now run
glm = GlmRun(**config.glm)
glm.run()


## Summarize
## Goal: To easily represent the 4D GLM results (2D matrix) as 3D (1D vector) 
##       for easy visualization and comparison

# output directory
summarize_out = config.summarize['out_dir']
if not path.exists(summarize_out):
    os.mkdir(summarize_out)

# get args
arg_order = ["regressors", "mask", "rois", "tvals", "out_dir"]
args = [ config.summarize[arg] for arg in arg_order ]