~nipy-developers/nipy/trunk-interfaces

« back to all changes in this revision

Viewing changes to nipy/pypemodules/FBIRNsource.py

  • Committer: Satrajit Ghosh
  • Date: 2009-07-15 12:44:49 UTC
  • Revision ID: satra@unwarped.home-20090715124449-tw3icmsxyytdqr1y
haha - added some docs and cleaned some code

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import nipy.interfaces as nif
2
 
import glob
3
 
import os
4
 
 
5
 
 
6
 
class FBIRNsource(nif.InterfaceBase):
7
 
    def __init__(self):
8
 
        super(FBIRNsource,self).__init__()
9
 
        self.diskbased = False
10
 
        self.name = 'FBIRNsource'
11
 
        self.log = {}
12
 
        self.inputs['base_dir'] = None
13
 
        self.inputs['subject_id'] = None
14
 
        self.outputs['struct_series'] = None
15
 
        self.outputs['funct_series'] = None
16
 
 
17
 
    def pre_execute(self):
18
 
        pass
19
 
 
20
 
    def execute(self):
21
 
        """Execute the cmd
22
 
        """
23
 
        self.log['returncode'] = 0
24
 
        subjdir = 'mgh-%s.1' % self.inputs['subject_id']
25
 
        struct_path = os.path.join(self.inputs['base_dir'],subjdir,'anat','ds*.nii')
26
 
        funct_path = os.path.join(self.inputs['base_dir'],subjdir,'bold','*','*.nii')
27
 
        self.outputs['struct_series'] = glob.glob(struct_path)
28
 
        self.outputs['funct_series'] = glob.glob(funct_path)       
29
 
    
30
 
    def post_execute(self):
31
 
        # check to see that the output file exists.
32
 
        pass