
import os
import numpy as np
import pyrelacs.DataLoader as Dl


def main():
    folder = "data/final/"
    stim_files = []

    for cell in sorted(os.listdir(folder)):

        base_path = folder + cell

        for info, key, time, x in Dl.iload_traces(base_path, repro="FileStimulus", before=0, after=0):
            print(cell)
            if len(info) == 2 and "file" in info[1].keys():
                stim_files.append(info[1]["file"])
            break


    for file in np.unique(stim_files):
        print(file)


if __name__ == '__main__':
    main()
