Exemplo n.º 1
0
    if line.startswith('#') or not line.strip():
        pass # skip comment lines & blank lines
    else:
        spl_line = line.split()
        if spl_line[1] == "1": #box enabled
            box_nums.append(int(spl_line[0]))
            bird_nums.append(int(spl_line[2]))
            processes.append(spl_line[4])

inf.close()
subjects = ['B%d' % (bird_num) for bird_num in bird_nums]
data_folder = '/home/bird/opdat'
# load all data
with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    behav_data = load_data_pandas(subjects, data_folder);

f = open('/home/bird/all.summary', 'w')

f.write("this all.summary generated at %s\n" % (dt.datetime.now().strftime('%x %X')))

f.write("FeedErr(won't come up, won't go down, already up, resp during feed)\n")

# Now loop through each bird and grab the error info from each summaryDAT file
for (box, bird, proc) in zip(box_nums, bird_nums, processes):
    try:
        if proc in ('shape','lights','pylights', 'lights.py'):
            f.write("box %d\tB%d\t %s\n" % (box, bird, proc))
        else:
            summaryfname = "/home/bird/opdat/B%d/%d.summaryDAT" % (bird, bird)
            sdat = open(summaryfname, 'rt')
Exemplo n.º 2
0
    for line in in_f.readlines():
        if line.startswith('#') or not line.strip():
            pass # skip comment lines & blank lines
        else:
            spl_line = line.split()
            if spl_line[1] == "1": #box enabled
                box_nums.append(int(spl_line[0]))
                bird_nums.append(int(spl_line[2]))
                processes.append(spl_line[-1])

subjects = ['B%d' % (bird_num) for bird_num in bird_nums]
data_folder = '/home/bird/opdat'
# load all data
with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    behav_data = load_data_pandas(subjects, data_folder);

with open(DATA_PATH+'all.compassion', 'w') as f:

    f.write("this all.compassion ran on %s at %s\n" % (gethostname(), dt.datetime.now().strftime('%x %X')))

    # Now loop through each bird and grab the error info from each summaryDAT file
    for (box, bird, proc) in zip(box_nums, bird_nums, processes):
        try:
            if proc in ('Lights',):
                pass
            else:
                configfname = "/home/bird/opdat/B%d/config.json" % (bird)
                try:
                    with open(configfname, 'rb') as config:
                        parameters = json.load(config)
Exemplo n.º 3
0
with open(process_fname, 'rt') as in_f:
    for line in in_f.readlines():
        if line.startswith('#') or not line.strip():
            pass # skip comment lines & blank lines
        else:
            spl_line = line.split()
            if spl_line[1] == "1": #box enabled
                box_nums.append(int(spl_line[0]))
                bird_nums.append(int(spl_line[2]))
                processes.append(spl_line[-1])

subjects = ['B%d' % (bird_num) for bird_num in bird_nums]
# load all data
with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    behav_data = load_data_pandas(subjects, DATA_PATH);

with open(DATA_PATH+'all.summary','w') as f:

    f.write("this all.summary generated at %s\n" % (dt.datetime.now().strftime('%x %X')))

    f.write("FeedErr(won't come up, won't go down, already up, resp during feed)\n")

    # Now loop through each bird and grab the error info from each summaryDAT file
    for (box, bird, proc) in zip(box_nums, bird_nums, processes):
        try:
            if proc in ('Lights',):
                f.write("box %d\tB%d\t %s\n" % (box, bird, proc))
            else:
                summaryfname = "/home/bird/opdat/B%d/%d.summaryDAT" % (bird, bird)
                with open(summaryfname, 'rt') as sdat: