Ejemplo n.º 1
0
import pylab
import glob

from nibabel import load, save, Nifti1Image
from retino.angular_analysis import load_texture, save_texture, angular_maps

from nipy.modalities.fmri.design_matrix import make_dmtx
from nipy.modalities.fmri.glm import GeneralLinearModel, data_scaling
from nipy.labs import compute_mask_files
from config_look_loc import make_paths

# -----------------------------------------------------------
# --------- Set the paths -----------------------------------
#-----------------------------------------------------------

paths = make_paths()
subjects = paths.keys()[:1]
result_dir = 'analysis'

# choose volume-based or surface-based analysis
sides = ['left', 'right'] #[False] #
# False: volume-based analysis
# left: left hemisphere
# right: right hemisphere

# ---------------------------------------------------------
# -------- General data-related Information ---------------
# ---------------------------------------------------------
tr = 2.4
nb_frames = 166
frametimes = np.arange(nb_frames) * tr
Ejemplo n.º 2
0
"""
Visualization of retinotopy results

Author: Bertrand Thirion, 2012
"""

import numpy as np
import os.path as op

import enthought.mayavi.mlab as mlab
from nibabel.gifti import read

from retino.visu_mlab import plot_retino_image
from config_look_loc import make_paths
paths = make_paths()

for subject in paths.keys():
    print subject
    func_path = op.join(paths[subject]['base'], paths[subject]['acquisition'],
                        'analysis')
    # set all the paths
    ltex_path = op.join(func_path, 'left_phase_wedge.gii')
    rtex_path = op.join(func_path, 'right_phase_wedge.gii')

    lmesh_path_inflated = paths[subject]['left_inflated']
    lcurv_path = op.join(op.dirname(lmesh_path_inflated), 'lh.avg_curv.gii')
    rmesh_path_inflated = paths[subject]['right_inflated']
    rcurv_path = op.join(op.dirname(lmesh_path_inflated), 'rh.avg_curv.gii')

    lmask_path = op.join(func_path, 'left_mask.gii')
    rmask_path = op.join(func_path, 'right_mask.gii')
from nibabel import load, save, Nifti1Image

from nipy.modalities.fmri.design_matrix import make_dmtx
from nipy.modalities.fmri.experimental_paradigm import BlockParadigm
from nipy.modalities.fmri.glm import GeneralLinearModel, data_scaling
from nipy.labs import compute_mask_files

from retino.angular_analysis import (
    load_texture, save_texture, cc_array_mask, cc_mesh_mask, phase_unwrapping)
from config_look_loc import make_paths

# -----------------------------------------------------------
# --------- Set the paths -----------------------------------
#-----------------------------------------------------------

paths = make_paths()
subjects = paths.keys()
result_dir = 'block'

# choose volume-based or surface-based analysis
sides = ['left', 'right'] # [False] #
# False: volume-based analysis
# left: left hemisphere
# right: right hemisphere

# ---------------------------------------------------------
# -------- General data-related Information ---------------
# ---------------------------------------------------------
tr = 2.4
nb_frames = 166
frametimes = np.arange(nb_frames) * tr