
import pyrelacs.DataLoader as Dl


def main():
    traces_missing()


# Index / Value error depending on cell:
def throw_error():
    cell_folder = "../invivo_data/2014-06-06-ah-invivo-1/"
    repro = "BaselineActivity"

    for info, key, time, x in Dl.iload_traces(cell_folder, repro=repro):
        continue


def traces_missing():
    cell_folder = "../invivo_data/2011-10-25-ab-invivo-1"

    repro = "BaselineActivity"

    time_traces = []
    v1_traces = []
    eod_traces = []
    local_eod_traces = []
    stimulus_traces = []

    for info, key, time, x in Dl.iload_traces(cell_folder, repro=repro):
        time_traces.append(time)
        v1_traces.append(x[0])
        eod_traces.append(x[1])
        local_eod_traces.append(x[2])
        stimulus_traces.append(x[3])

    print("num of v1 traces: {:}\nnum of eod traces: {:}\nnum of local eod traces: {:}\nnum of stim traces: {:}".format(len(v1_traces), len(eod_traces), len(local_eod_traces), len(stimulus_traces)))


if __name__ == '__main__':
    main()