root = bg.SimpleDirDialog(prompt='Choose FDG data dir', indir='/home/jagust') cleantime = asctime().replace(' ', '-').replace(':', '-') logfile = os.path.join(root, 'logs', '%s_%s.log' % (__file__, cleantime)) log_settings = pp.get_logging_configdict(logfile) logging.config.dictConfig(log_settings) tracer = 'FDG' user = os.environ['USER'] logging.info('###START %s %s :::' % (tracer, __file__)) logging.info('###TRACER %s :::' % (tracer)) logging.info('###USER : %s' % (user)) subs = bg.MyDirsDialog(prompt='Choose Subjects ', indir='%s/' % root) roid = pp.roilabels_fromcsv(roifile) alld = {} for sub in subs: if 'v2' in sub: logging.info('Skipping visit 2 %s' % (sub)) continue _, fullsubid = os.path.split(sub) try: m = pp.re.search('B[0-9]{2}-[0-9]{3}_v[0-9]', fullsubid) subid = m.group() except: logging.error('no visit marker in %s' % fullsubid) try: m = pp.re.search('B[0-9]{2}-[0-9]{3}', fullsubid) subid = m.group()
cleantime = asctime().replace(' ','-').replace(':', '-') logfile = os.path.join(root,'logs', '%s_%s.log'%(__file__, cleantime)) log_settings = pp.get_logging_configdict(logfile) logging.config.dictConfig(log_settings) tracer = 'PIB' user = os.environ['USER'] logging.info('###START %s %s :::'%(tracer, __file__)) logging.info('###TRACER %s :::'%(tracer)) logging.info('###USER : %s'%(user)) subs = bg.MyDirsDialog(prompt='Choose Subjects ', indir='%s/'%root) roid = pp.roilabels_fromcsv(roifile) alld = {} for sub in subs: if 'v2' in sub: logging.info('Skipping visit 2 %s'%(sub)) continue _, fullsubid = os.path.split(sub) try: m = pp.re.search('B[0-9]{2}-[0-9]{3}_v[0-9]',fullsubid) subid = m.group() except: logging.error('cant find ID in %s'%fullsubid) continue logging.info('%s'%subid) pth = os.path.join(sub, tracer.lower()) dvrdir = os.path.join(pth, 'dvr')