pynetstim/coordinates.py
def _read_talaraich_transformation(self):
       
        """ read talairach transformation from freesurfer talairach.xfm output"""
        
        fname = '{freesurfer_dir}/{subject}/mri/transforms/talairach.xfm'.format(freesurfer_dir=self.freesurfer_dir,
                                                                               subject=self.subject)
        f = open(fname,'r').read().split('\n')
        
        ### cleaning rows of file
        def clean_number(x):
            if ';' in x:
                return float(x[0:-1])
            else:
                return float(x)
            
        rows = []
        for i in [5,6,7]:
            row = f[i].split(' ')
            row = [clean_number(x) for x in row]
            rows.append(row)
            
        return np.array(rows)
 read talairach transformation from freesurfer talairach.xfm output
read talairach transformation from freesurfer talairach.xfm output
read talairach transformation from freesurfer talairach . xfm output
def _read_talaraich_transformation(self):
        fname = '{freesurfer_dir}/{subject}/mri/transforms/talairach.xfm'.format(freesurfer_dir=self.freesurfer_dir,
                                                                               subject=self.subject)
        f = open(fname,'r').read().split('\n')
        def clean_number(x):
            if ';' in x:
                return float(x[0:-1])
            else:
                return float(x)
        rows = []
        for i in [5,6,7]:
            row = f[i].split(' ')
            row = [clean_number(x) for x in row]
            rows.append(row)
        return np.array(rows)
def _read_talaraich_transformation ( self ) : fname = '{freesurfer_dir}/{subject}/mri/transforms/talairach.xfm' . format ( freesurfer_dir = self . freesurfer_dir , subject = self . subject ) f = open ( fname , 'r' ) . read ( ) . split ( '\n' ) def clean_number ( x ) : if ';' in x : return float ( x [ 0 : - 1 ] ) else : return float ( x ) rows = [ ] for i in [ 5 , 6 , 7 ] : row = f [ i ] . split ( ' ' ) row = [ clean_number ( x ) for x in row ] rows . append ( row ) return np . array ( rows )
read talairach transformation from freesurfer talairach.xfm output
read talairach transformation from freesurfer talairach . xfm output
""" read talairach transformation from freesurfer talairach.xfm output""" ### cleaning rows of file
self