extraLineParameters = ''
list_of_files = {}

# let's get a list of directories in Projects
projectsDirs = functions.getProjectDirs(settings.projectsPath)
for fullProjectDirPath in projectsDirs:
	if not settings.ignoreDirPat.match(fullProjectDirPath) :
		path = fullProjectDirPath + os.sep + "Extracted-files" 
		njob = 0
		##GO THROUGH EXTRACTED FILES
		for (dirpath, dirnames, filenames) in os.walk(path):
			sumBinFileSizes = 0
			pathComponents = dirpath.split(os.sep)
			# we find where the "Extracted-files" folder is and then assume the tracker is on the next subdir structure. Not super robust..
			tracker = functions.getTrackerName(pathComponents)
			if tracker in settings.rubenTrackers:
				##IGNORE NON T16 TRACKERS
				for filename in filenames:
					##CHECK IF WE NEED TO RUN NEW DATA
					if (filename[-4:] == ".bin" and
						not filename.endswith('values.bin') and
						not filename.endswith('led1.bin') and
						not filename.endswith('led2.bin')) : # we only care about bin files
						
						btdfile = 'btdfiles/btd_' + filename[:-4] + ".mat"
						os.path.normpath(filename)
						lineName, filenameExtension = os.path.splitext(filename)
						if os.path.isfile(dirpath + os.sep + btdfile):
							print 'Skipping ' + lineName
						else:
import filecmp
import re
import datetime

sys.path.append('../settings')
import settings
import functions

projectsDirs = functions.getProjectDirs(settings.projectsPath)
for fullProjectDirPath in projectsDirs:
    if not settings.ignoreDirPat.match(fullProjectDirPath):
        matfileProjectDirPath = fullProjectDirPath + os.sep + 'Mat-files'
        for (matFilesPath, matDirNames,
             matFileNames) in os.walk(matfileProjectDirPath):
            pathComponents = matFilesPath.split(os.sep)
            tracker = functions.getTrackerName(pathComponents)
            if tracker in settings.rubenTrackers:
                continue
            for matDirName in matDirNames:
                if re.match(
                        matDirName, 'matfiles'
                ):  # we only process if we have a folder with .mat files - Even though we don't care about them here
                    calculationsFullPath = matFilesPath + os.sep + 'calculations'
                    matFilesPathComp = matFilesPath.split(os.sep)
                    tracker = functions.getTrackerName(matFilesPathComp)
                    possibleIndividualDir = matFilesPathComp[
                        len(matFilesPathComp) - 2]
                    # By default we don't run the combination of analysis..
                    mustRun = False
                    individualAnalysisFilesPresent = False
                    individualMatFilesDir = matFilesPath + os.sep + 'individualMatfiles'