Exemplo n.º 1
0
#
################################################################
import sys
import os

root = os.path.dirname(
    os.path.dirname(os.path.dirname(os.path.dirname(
        os.path.abspath(__file__)))))
if root not in sys.path:
    sys.path.append(root)

import pandas as pd
import numpy as np
from utilities.settings import Params, Paths

params = Params()
paths = Paths()


class Bottomup(object):
    """Container module with an encoder, a recurrent module, and a decoder."""
    def __init__(self, language):
        super(Bottomup, self).__init__()
        self.language = language

    def __name__(self):
        return 'bottomup'

    def generate(self, path, language, textgrid):
        # create specific onsets-offsets
        source = 'text'
################################################################################
# Create the local folder architecture necessary for the script to run correctly
# Should be run from: $LePetitPrince/code/
#       $ cd $LePetitPrince/code/
#       $ python create_data_architecture.py
################################################################################

import os
from utilities.settings import Subjects, Paths, Params
from utilities.utils import check_folder

subjects = Subjects()
paths = Paths()
params = Params()
languages = params.languages

##################### ROOT #####################
os.chdir(paths.path2root)
check_folder('data')
check_folder('derivatives')
check_folder('paradigm')
check_folder('oldstuff')

##################### DATA #####################
os.chdir(paths.path2data)
## fMRI ##
check_folder('fMRI')
for language in languages:
    check_folder('fMRI/{}'.format(language))
    for subject in subjects.get_all(language):
        check_folder('fMRI/{}/{}'.format(language, subject))