def setupTwoLevelDirectories(csvFile, outputDir, pipeName, module):
    
    if not pipeName:
        pipeName = str(date.today()) + "_pipeline"
    firstLevelDir = fh.createSubDir(outputDir, pipeName + "_firstlevel")
    fileList = open(csvFile, 'rb')
    subjectList = csv.reader(fileList, delimiter=',', skipinitialspace=True)
    subjectDirs = {} # One StandardMBMDirectories for each subject
    index = 0
    for subj in subjectList:
        base = splitext(basename(subj[0]))[0]
        dirs = setupDirectories(firstLevelDir, base, module)
        subjectDirs[index] = dirs
        index += 1    
    secondLevelDir = fh.createSubDir(outputDir, pipeName + "_secondlevel")
    dirs = setupDirectories(secondLevelDir, "second_level", "ALL")
    return (subjectDirs, dirs)
Reads pregnancy data and partitions first babies and others.
dataset/ETHPy150Open Mouse-Imaging-Centre/pydpiper/atoms_and_modules/registration_functions.py/setupTwoLevelDirectories--crossover with--dataset/ETHPy150Open AllenDowney/CompStats/nsfg2.py/MakeFrames