thq = 0.95 verbose = 1 smin = 5 write_dir = path.join(getcwd(), 'results') if not path.exists(write_dir): mkdir(write_dir) method = 'quick' print 'method used:', method # call the function AF, BF = make_bsa_image(mask_images, betas, theta, dmax, ths, thq, smin, write_dir, method, subj_id, '%04d' % nbeta, reshuffle=False) # Write the result. OK, this is only a temporary solution picname = path.join(write_dir, "AF_%04d.pic" % nbeta) pickle.dump(AF, open(picname, 'w'), 2) picname = path.join(write_dir, "BF_%04d.pic" % nbeta) pickle.dump(BF, open(picname, 'w'), 2) print "Wrote all the results in directory %s" % write_dir
if missing_file: get_data_light.get_it() # set various parameters subj_id = ['%04d' %i for i in range(12)] theta = float(stats.t.isf(0.01, 100)) dmax = 4. ths = 0 thq = 0.95 verbose = 1 smin = 5 swd = tempfile.mkdtemp() method = 'quick' print 'method used:', method # call the function AF, BF = make_bsa_image(mask_images, betas, theta, dmax, ths, thq, smin, swd, method, subj_id, '%04d' % nbeta, reshuffle=False) # Write the result. OK, this is only a temporary solution import pickle picname = op.join(swd,"AF_%04d.pic" %nbeta) pickle.dump(AF, open(picname, 'w'), 2) picname = op.join(swd,"BF_%04d.pic" %nbeta) pickle.dump(BF, open(picname, 'w'), 2) print "Wrote all the results in directory %s" % swd
betas = [path.join(data_dir, 'spmT_%04d_subj_%02d.nii' % (nbeta, n)) for n in range(nbsubj)] missing_file = array([not path.exists(m) for m in mask_images + betas]).any() if missing_file: get_second_level_dataset() # set various parameters subj_id = ['%04d' % i for i in range(12)] threshold = float(stats.t.isf(0.01, 100)) sigma = 4. prevalence_threshold = 2 prevalence_pval = 0.95 smin = 5 write_dir = path.join(getcwd(), 'results') if not path.exists(write_dir): mkdir(write_dir) algorithm = 'density' print('algorithm used:', algorithm) # call the function landmarks, individual_rois = make_bsa_image( mask_images, betas, threshold, smin, sigma, prevalence_threshold, prevalence_pval, write_dir, algorithm=algorithm, contrast_id='%04d' % nbeta) print("Wrote all the results in directory %s" % write_dir)
if missing_file: get_second_level_dataset() # set various parameters subj_id = ['%04d' % i for i in range(12)] threshold = float(stats.t.isf(0.01, 100)) sigma = 4. prevalence_threshold = 2 prevalence_pval = 0.95 smin = 5 write_dir = path.join(getcwd(), 'results') if not path.exists(write_dir): mkdir(write_dir) algorithm = 'density' print('algorithm used:', algorithm) # call the function landmarks, individual_rois = make_bsa_image(mask_images, betas, threshold, smin, sigma, prevalence_threshold, prevalence_pval, write_dir, algorithm=algorithm, contrast_id='%04d' % nbeta) print("Wrote all the results in directory %s" % write_dir)