import pylab import scipy import os #this is fish that is shocked and then replaced in same tank with new water e_shock = [ '/home/vburns/Dropbox/ConchisData/2014-03-31/f01193/f01193_2014-03-31-13-19-56.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01194/f01194_2014-03-31-13-20-05.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01195/f01195_2014-03-31-13-20-17.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01196/f01196_2014-03-31-13-20-28.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01197/f01197_2014-03-31-13-20-38.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01198/f01198_2014-03-31-13-20-51.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01199/f01199_2014-03-31-13-21-03.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01200/f01200_2014-03-31-13-21-18.json', ] e_shock = aba.loadMultipleDataFiles(e_shock) e_sec = [ '/home/vburns/Dropbox/ConchisData/2014-03-31/f01193/f01193_2014-03-31-14-18-56.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01194/f01194_2014-03-31-14-19-14.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01195/f01195_2014-03-31-14-19-26.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01196/f01196_2014-03-31-14-19-48.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01197/f01197_2014-03-31-14-20-00.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01198/f01198_2014-03-31-14-20-11.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01199/f01199_2014-03-31-14-20-23.json', '/home/vburns/Dropbox/ConchisData/2014-03-31/f01200/f01200_2014-03-31-14-20-41.json', ] e_sec = aba.loadMultipleDataFiles(e_sec) print 'Done loading fish'
'/home/vburns/Dropbox/ConchisData/2013-02-17/f00165/f00165_2013-02-17-12-33-25.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00166/f00166_2013-02-17-12-33-22.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00167/f00167_2013-02-17-12-33-19.json', '/home/vburns/Dropbox/ConchisData/2013-02-24/f00190/f00190_2013-02-24-13-54-44.json', '/home/vburns/Dropbox/ConchisData/2013-02-24/f00191/f00191_2013-02-24-13-56-11.json', '/home/vburns/Dropbox/ConchisData/2013-02-24/f00192/f00192_2013-02-24-13-55-53.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00193/f00193_2013-02-26-14-46-26.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00194/f00194_2013-02-26-14-46-23.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00195/f00195_2013-02-26-14-46-20.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00196/f00196_2013-02-26-14-46-18.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00197/f00197_2013-02-26-14-46-16.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00198/f00198_2013-02-26-14-46-14.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00199/f00199_2013-02-26-14-46-11.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00200/f00200_2013-02-26-14-46-09.json' ] e_shockR = aba.loadMultipleDataFiles(e_shockR) e_RTR = [ '/home/vburns/Dropbox/ConchisData/2013-02-17/f00160/f00160_2013-02-17-11-45-31.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00161/f00161_2013-02-17-11-44-11.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00162/f00162_2013-02-17-11-44-48.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00164/f00164_2013-02-17-13-24-08.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00165/f00165_2013-02-17-13-24-41.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00166/f00166_2013-02-17-13-25-07.json', '/home/vburns/Dropbox/ConchisData/2013-02-17/f00167/f00167_2013-02-17-13-25-49.json', '/home/vburns/Dropbox/ConchisData/2013-02-24/f00190/f00190_2013-02-24-14-48-06.json', '/home/vburns/Dropbox/ConchisData/2013-02-24/f00191/f00191_2013-02-24-14-47-47.json', '/home/vburns/Dropbox/ConchisData/2013-02-24/f00192/f00192_2013-02-24-14-47-36.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00193/f00193_2013-02-26-15-38-30.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00194/f00194_2013-02-26-15-38-27.json', '/home/vburns/Dropbox/ConchisData/2013-02-26/f00195/f00195_2013-02-26-15-38-34.json',
'/home/vburns/Dropbox/ConchisData/2013-10-31/f00844/f00844_2013-10-31-13-49-11.json', # '/home/vburns/Dropbox/ConchisData/2013-10-31/f00845/f00845_2013-10-31-13-49-42.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00846/f00846_2013-10-31-13-49-35.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00847/f00847_2013-10-31-13-49-28.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00848/f00848_2013-10-31-13-49-20.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00857/f00857_2013-11-01-13-21-13.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00858/f00858_2013-11-01-13-21-19.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00859/f00859_2013-11-01-13-21-27.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00860/f00860_2013-11-01-13-21-34.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00861/f00861_2013-11-01-13-21-42.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00862/f00862_2013-11-01-13-21-48.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00863/f00863_2013-11-01-13-21-58.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00864/f00864_2013-11-01-13-22-03.json', ] e_omr_same_pre=aba.loadMultipleDataFiles(e_omr_same_pre) e_omr_same = [ '/home/vburns/Dropbox/ConchisData/2013-10-31/f00833/f00833_2013-10-31-10-28-04.json', # '/home/vburns/Dropbox/ConchisData/2013-10-31/f00834/f00834_2013-10-31-10-28-11.json', # '/home/vburns/Dropbox/ConchisData/2013-10-31/f00835/f00835_2013-10-31-10-28-18.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00836/f00836_2013-10-31-10-28-24.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00841/f00841_2013-10-31-14-22-11.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00842/f00842_2013-10-31-14-22-04.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00843/f00843_2013-10-31-14-21-56.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00844/f00844_2013-10-31-14-21-50.json', #'/home/vburns/Dropbox/ConchisData/2013-10-31/f00845/f00845_2013-10-31-14-22-35.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00846/f00846_2013-10-31-14-22-28.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00847/f00847_2013-10-31-14-22-21.json', '/home/vburns/Dropbox/ConchisData/2013-10-31/f00848/f00848_2013-10-31-14-22-17.json', '/home/vburns/Dropbox/ConchisData/2013-11-01/f00857/f00857_2013-11-01-13-55-06.json',
import ArenaBehaviorAnalysis as aba import pylab import numpy as np import matplotlib as mpl import matplotlib.pyplot as pyplot import pylab import scipy import os control = ['/home/vburns/Dropbox/ConchisData/2014-02-20/f01039/f01039_2014-02-20-16-23-30.json', '/home/vburns/Dropbox/ConchisData/2014-02-20/f01040/f01040_2014-02-20-16-23-19.json'] control = aba.loadMultipleDataFiles(control) experimental = [ '/home/vburns/Dropbox/ConchisData/2014-02-20/f01037/f01037_2014-02-20-15-45-35.json', '/home/vburns/Dropbox/ConchisData/2014-02-20/f01038/f01038_2014-02-20-15-45-43.json'] experimental = aba.loadMultipleDataFiles(experimental) print "Done loading fish." datanames = ['985', '986'] #data = [experimental] data = [control]
import ArenaBehaviorAnalysis as aba import pylab import numpy as np e_fish_youngNR = [ "/home/vburns/Dropbox/ConchisData/2013-02-12/f00134/f00134_2013-02-12-17-57-45.json", "/home/vburns/Dropbox/ConchisData/2013-02-12/f00135/f00135_2013-02-12-17-57-30.json", ] e_fish_youngNR = aba.loadMultipleDataFiles(e_fish_youngNR) e_fish_youngR = "/home/vburns/Dropbox/ConchisData/2013-02-12/f00136/f00136_2013-02-12-17-57-33.json" e_fish_youngR = aba.loadDataFromFile(e_fish_youngR) e_fish_youngR = [e_fish_youngR] e_fish_oldNR = [ "/home/vburns/Dropbox/ConchisData/2013-02-12/f00138/f00138_2013-02-12-17-57-37.json", "/home/vburns/Dropbox/ConchisData/2013-02-12/f00139/f00139_2013-02-12-17-57-40.json", ] e_fish_oldNR = aba.loadMultipleDataFiles(e_fish_oldNR) e_fish_oldR = [ "/home/vburns/Dropbox/ConchisData/2013-02-12/f00140/f00140_2013-02-12-17-57-48.json", "/home/vburns/Dropbox/ConchisData/2013-02-12/f00141/f00141_2013-02-12-17-57-51.json", "/home/vburns/Dropbox/ConchisData/2013-02-12/f00142/f00142_2013-02-12-17-57-53.json", ] e_fish_oldR = aba.loadMultipleDataFiles(e_fish_oldR) # assumes shock is on red (e_frac_yNR, e_dist_yNR) = aba.getSidePreference_Multi(e_fish_youngNR, cond=[8, 8], refState="Red") (e_frac_yR, e_dist_yR) = aba.getSidePreference_Multi(e_fish_youngR, cond=[8, 8], refState="Red") (e_frac_oNR, e_dist_oNR) = aba.getSidePreference_Multi(e_fish_oldNR, cond=[8, 8], refState="Red")
import pylab import scipy #first is 30 min in safe tank, then standard shocking, then 30 min in safe tank e_shock5 = [ '/home/vburns/Dropbox/ConchisData/2013-03-29/f00239/f00239_2013-03-29-17-46-08.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00240/f00240_2013-03-29-17-46-14.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00241/f00241_2013-03-29-17-46-21.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00242/f00242_2013-03-29-17-46-29.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00243/f00243_2013-03-29-17-51-19.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00244/f00244_2013-03-29-17-51-24.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00245/f00245_2013-03-29-17-51-30.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00246/f00246_2013-03-29-17-51-35.json', ] e_shock5 = aba.loadMultipleDataFiles(e_shock5) e_shock8 = [ '/home/vburns/Dropbox/ConchisData/2013-03-29/f00247/f00247_2013-03-29-19-52-28.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00248/f00248_2013-03-29-19-52-26.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00249/f00249_2013-03-29-19-52-24.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00250/f00250_2013-03-29-19-52-21.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00251/f00251_2013-03-29-19-53-39.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00252/f00252_2013-03-29-19-53-37.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00253/f00253_2013-03-29-19-53-34.json', '/home/vburns/Dropbox/ConchisData/2013-03-29/f00254/f00254_2013-03-29-19-53-32.json', ] e_shock8= aba.loadMultipleDataFiles(e_shock8) e_safe5_sec = [ '/home/vburns/Dropbox/ConchisData/2013-03-29/f00239/f00239_2013-03-29-18-40-05.json',
import ArenaBehaviorAnalysis as aba import pylab import numpy as np e_fish_red = ['/home/vburns/Dropbox/ConchisData/2012-12-12/120612_HuC_f1/120612_HuC_f1_2012-12-12-15-31-39.json', '/home/vburns/Dropbox/ConchisData/2012-12-12/120612_HuC_f2/120612_HuC_f2_2012-12-12-15-31-32.json',] e_fish_red = aba.loadMultipleDataFiles(e_fish_red) e_fish_blue = ['/home/vburns/Dropbox/ConchisData/2012-12-12/120612_HuC_f3/120612_HuC_f3_2012-12-12-15-31-47.json', '/home/vburns/Dropbox/ConchisData/2012-12-12/120612_HuC_f4/120612_HuC_f4_2012-12-12-15-31-52.json'] e_fish_blue = aba.loadMultipleDataFiles(e_fish_blue) c_fish = ['/home/vburns/Dropbox/ConchisData/2013-01-16/f00084/f00084_2013-01-16-15-28-12.json', '/home/vburns/Dropbox/ConchisData/2013-01-16/f00085/f00085_2013-01-16-15-28-14.json', '/home/vburns/Dropbox/ConchisData/2013-01-16/f00086/f00086_2013-01-16-15-28-09.json', '/home/vburns/Dropbox/ConchisData/2013-01-16/f00087/f00087_2013-01-16-15-28-06.json'] c_fish = aba.loadMultipleDataFiles(c_fish) #assumes cocaine is on red (e_frac_pr, e_dist_pr) = aba.getSidePreference_Multi(e_fish_red, cond = [3,3], refState ='Red') (e_frac_pb, e_dist_pb) = aba.getSidePreference_Multi(e_fish_blue, cond = [3,3], refState ='Blue') (e_frac_por, e_dist_por) = aba.getSidePreference_Multi(e_fish_red, cond = [8,8], refState ='Red') (e_frac_pob, e_dist_pob) = aba.getSidePreference_Multi(e_fish_blue, cond = [8,8], refState ='Blue') (c_frac_pre,c_dist_pre) = aba.getSidePreference_Multi(c_fish, cond = [3,3], refState = 'Red') (c_frac_post,c_dist_post) = aba.getSidePreference_Multi(c_fish, cond = [8,8], refState = 'Red') e_frac_pre = np.append(e_frac_pr, e_frac_pb, axis = 0) e_frac_post = np.append(e_frac_por, e_frac_pob, axis =0) e_dis_pre = np.append(e_dist_pr, e_dist_pb, axis = 0) e_dis_post = np.append(e_dist_por, e_dist_pob, axis = 0)
# os.path.expanduser('~/Dropbox/ConchisData/2013-05-16/f00439/f00439_2013-05-16-14-13-09.json'), #low velocity in second base # os.path.expanduser('~/Dropbox/ConchisData/2013-05-16/f00440/f00440_2013-05-16-14-13-20.json'), #tracking os.path.expanduser("~/Dropbox/ConchisData/2013-05-16/f00441/f00441_2013-05-16-14-13-27.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-16/f00442/f00442_2013-05-16-14-16-16.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-16/f00444/f00444_2013-05-16-14-16-04.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-16/f00445/f00445_2013-05-16-14-15-59.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00446/f00446_2013-05-17-12-47-21.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00447/f00447_2013-05-17-12-47-23.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00448/f00448_2013-05-17-12-47-25.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00449/f00449_2013-05-17-12-47-27.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00450/f00450_2013-05-17-12-49-05.json"), # os.path.expanduser('~/Dropbox/ConchisData/2013-05-17/f00451/f00451_2013-05-17-12-49-07.json'), #current imbalance and tracking os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00452/f00452_2013-05-17-12-49-08.json"), os.path.expanduser("~/Dropbox/ConchisData/2013-05-17/f00453/f00453_2013-05-17-12-49-10.json"), ] e_first = aba.loadMultipleDataFiles(e_first) e_shock = [ "/home/vburns/Dropbox/ConchisData/2013-03-29/f00239/f00239_2013-03-29-17-46-08.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00240/f00240_2013-03-29-17-46-14.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00241/f00241_2013-03-29-17-46-21.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00242/f00242_2013-03-29-17-46-29.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00243/f00243_2013-03-29-17-51-19.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00244/f00244_2013-03-29-17-51-24.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00245/f00245_2013-03-29-17-51-30.json", "/home/vburns/Dropbox/ConchisData/2013-03-29/f00246/f00246_2013-03-29-17-51-35.json", "/home/vburns/Dropbox/ConchisData/2013-04-29/f00366/f00366_2013-04-29-10-26-30.json", # '/home/vburns/Dropbox/ConchisData/2013-04-29/f00367/f00367_2013-04-29-10-26-37.json', "/home/vburns/Dropbox/ConchisData/2013-04-29/f00368/f00368_2013-04-29-10-26-43.json", "/home/vburns/Dropbox/ConchisData/2013-04-29/f00369/f00369_2013-04-29-10-26-53.json", # '/home/vburns/Dropbox/ConchisData/2013-04-29/f00370/f00370_2013-04-29-10-27-41.json',
"/Users/andalman/Dropbox/ConchisData/2013-10-02/f00723/f00723_2013-10-02-12-12-44.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00724/f00724_2013-10-02-12-12-35.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00725/f00725_2013-10-02-12-12-27.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00726/f00726_2013-10-02-12-12-13.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00727/f00727_2013-10-02-12-12-02.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00728/f00728_2013-10-02-12-11-55.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00737/f00737_2013-10-02-13-45-00.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00738/f00738_2013-10-02-13-44-48.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00739/f00739_2013-10-02-13-44-41.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00740/f00740_2013-10-02-13-44-34.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00741/f00741_2013-10-02-13-44-25.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00742/f00742_2013-10-02-13-44-17.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00743/f00743_2013-10-02-13-44-07.json", "/Users/andalman/Dropbox/ConchisData/2013-10-02/f00744/f00744_2013-10-02-13-44-01.json", ] c_omr = aba.loadMultipleDataFiles(c_omr) e_omr = [ "~/Dropbox/ConchisData/2013-10-03/f00753/f00753_2013-10-03-13-24-05.json", "~/Dropbox/ConchisData/2013-10-03/f00754/f00754_2013-10-03-13-24-13.json", "~/Dropbox/ConchisData/2013-10-03/f00755/f00755_2013-10-03-13-24-22.json", "~/Dropbox/ConchisData/2013-10-03/f00756/f00756_2013-10-03-13-24-34.json", "~/Dropbox/ConchisData/2013-10-03/f00757/f00757_2013-10-03-13-25-15.json", "~/Dropbox/ConchisData/2013-10-03/f00758/f00758_2013-10-03-13-25-09.json", "~/Dropbox/ConchisData/2013-10-03/f00759/f00759_2013-10-03-13-24-59.json", "~/Dropbox/ConchisData/2013-10-03/f00760/f00760_2013-10-03-13-24-50.json", "~/Dropbox/ConchisData/2013-10-03/f00761/f00761_2013-10-03-15-22-25.json", "~/Dropbox/ConchisData/2013-10-03/f00762/f00762_2013-10-03-15-22-20.json", "~/Dropbox/ConchisData/2013-10-03/f00763/f00763_2013-10-03-15-22-12.json", "~/Dropbox/ConchisData/2013-10-03/f00764/f00764_2013-10-03-15-22-05.json", "~/Dropbox/ConchisData/2013-10-03/f00765/f00765_2013-10-03-15-23-01.json",
import ArenaBehaviorAnalysis as aba import pylab import numpy as np e_test_f = [u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00076/f00076_2013-01-11-13-41-31.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00077/f00077_2013-01-11-13-41-34.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00078/f00078_2013-01-11-13-41-37.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00079/f00079_2013-01-11-13-41-39.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00076/f00076_2013-01-10-18-40-41.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00077/f00077_2013-01-10-18-40-38.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00078/f00078_2013-01-10-18-40-36.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00079/f00079_2013-01-10-18-40-34.json'] e_test = aba.loadMultipleDataFiles(e_test_f) e_lh_f = [u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00076/f00076_2013-01-11-12-29-51.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00077/f00077_2013-01-11-12-29-49.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00078/f00078_2013-01-11-12-29-46.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-11/f00079/f00079_2013-01-11-12-29-44.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00076/f00076_2013-01-10-18-03-08.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00077/f00077_2013-01-10-18-03-11.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00078/f00078_2013-01-10-18-03-13.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00079/f00079_2013-01-10-18-03-16.json'] e_lh = aba.loadMultipleDataFiles(e_lh_f) c_test_f = [u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00072/f00072_2013-01-10-17-16-45.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00073/f00073_2013-01-10-17-16-42.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00074/f00074_2013-01-10-17-16-39.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00075/f00075_2013-01-10-17-16-36.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00046/f00046_2013-01-09-18-24-16.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00047/f00047_2013-01-09-18-24-20.json', u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00048/f00048_2013-01-09-18-24-24.json',
# '/home/vburns/Dropbox/ConchisData/2013-05-15/f00424/f00424_2013-05-15-14-37-25.json',#low starting velocity # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00425/f00425_2013-05-15-14-37-21.json', #problem with plotting ##CHECKCHECK '/home/vburns/Dropbox/ConchisData/2013-05-15/f00426/f00426_2013-05-15-14-40-23.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00427/f00427_2013-05-15-14-40-20.json', #current imbalance '/home/vburns/Dropbox/ConchisData/2013-05-15/f00428/f00428_2013-05-15-14-40-18.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00429/f00429_2013-05-15-14-40-13.json', #tracking in sec? '/home/vburns/Dropbox/ConchisData/2013-05-16/f00430/f00430_2013-05-16-10-04-07.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00431/f00431_2013-05-16-10-04-05.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00432/f00432_2013-05-16-10-04-03.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00433/f00433_2013-05-16-10-04-01.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00434/f00434_2013-05-16-10-05-40.json', # '/home/vburns/Dropbox/ConchisData/2013-05-16/f00435/f00435_2013-05-16-10-05-42.json', #low starting velocity '/home/vburns/Dropbox/ConchisData/2013-05-16/f00436/f00436_2013-05-16-10-05-45.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00437/f00437_2013-05-16-10-05-47.json', ] e_water_first = aba.loadMultipleDataFiles(e_water_first) e_water_shock = [ '/home/vburns/Dropbox/ConchisData/2013-05-15/f00422/f00422_2013-05-15-15-08-23.json', '/home/vburns/Dropbox/ConchisData/2013-05-15/f00423/f00423_2013-05-15-15-08-34.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00424/f00424_2013-05-15-15-08-45.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00425/f00425_2013-05-15-15-08-54.json', '/home/vburns/Dropbox/ConchisData/2013-05-15/f00426/f00426_2013-05-15-15-11-28.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00427/f00427_2013-05-15-15-11-35.json', '/home/vburns/Dropbox/ConchisData/2013-05-15/f00428/f00428_2013-05-15-15-11-41.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00429/f00429_2013-05-15-15-11-46.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00430/f00430_2013-05-16-10-35-52.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00431/f00431_2013-05-16-10-35-47.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00432/f00432_2013-05-16-10-35-40.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00433/f00433_2013-05-16-10-35-34.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00434/f00434_2013-05-16-10-37-23.json',
import ArenaBehaviorAnalysis as aba import pylab import numpy as np #f is five day old fish, t is thirteen day old fish f_fish = ['/home/vburns/Dropbox/ConchisData/2013-01-09/f00056/f00056_2013-01-09-15-15-30.json', '/home/vburns/Dropbox/ConchisData/2013-01-09/f00057/f00057_2013-01-09-15-15-28.json', '/home/vburns/Dropbox/ConchisData/2013-01-09/f00058/f00058_2013-01-09-15-15-26.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00113/f00113_2013-01-30-10-58-49.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00014/f00014_2013-01-30-10-58-47.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00115/f00115_2013-01-30-10-58-45.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00116/f00116_2013-01-30-10-58-42.json'] f_fish = aba.loadMultipleDataFiles(f_fish) fb = '/home/vburns/Dropbox/ConchisData/2013-01-09/f00059/f00059_2013-01-09-15-15-24.json' fb = aba.loadDataFromFile(fb) fb['warpedTracking'][:,1] = 48-fb['warpedTracking'][:,1] f_fish = f_fish + [fb] t_fish = ['/home/vburns/Dropbox/ConchisData/2013-01-09/f00061/f00061_2013-01-09-14-30-06.json', '/home/vburns/Dropbox/ConchisData/2013-01-09/f00062/f00062_2013-01-09-14-30-08.json', '/home/vburns/Dropbox/ConchisData/2013-01-09/f00063/f00063_2013-01-09-14-30-10.json'] t_fish = aba.loadMultipleDataFiles(t_fish) tb = '/home/vburns/Dropbox/ConchisData/2013-01-09/f00060/f00060_2013-01-09-14-30-04.json' tb = aba.loadDataFromFile(tb) tb['warpedTracking'][:,1] = 48-tb['warpedTracking'][:,1] t_fish = t_fish + [tb]
'/home/vburns/Dropbox/ConchisData/2013-01-24/f00102/f00102_2013-01-24-18-55-23.json', '/home/vburns/Dropbox/ConchisData/2013-01-24/f00103/f00103_2013-01-24-18-55-20.json', '/home/vburns/Dropbox/ConchisData/2013-01-24/f00104/f00104_2013-01-24-18-55-18.json'] e_RT2 = aba.loadMultipleDataFiles(e_RT2) e_novel2 = ['/home/vburns/Dropbox/ConchisData/2013-01-24/f00101/f00101_2013-01-24-19-29-24.json', '/home/vburns/Dropbox/ConchisData/2013-01-24/f00102/f00102_2013-01-24-19-29-26.json', '/home/vburns/Dropbox/ConchisData/2013-01-24/f00103/f00103_2013-01-24-19-29-29.json', '/home/vburns/Dropbox/ConchisData/2013-01-24/f00104/f00104_2013-01-24-19-29-32.json'] e_novel2 = aba.loadMultipleDataFiles(e_novel2) """ e_shock = ['/home/vburns/Dropbox/ConchisData/2013-01-30/f00117/f00117_2013-01-30-11-51-11.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00118/f00118_2013-01-30-11-51-08.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00119/f00119_2013-01-30-11-51-05.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00120/f00120_2013-01-30-11-51-01.json'] e_shock = aba.loadMultipleDataFiles(e_shock) e_RT = ['/home/vburns/Dropbox/ConchisData/2013-01-30/f00117/f00117_2013-01-30-12-56-03.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00118/f00118_2013-01-30-12-56-08.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00119/f00119_2013-01-30-12-56-10.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00120/f00120_2013-01-30-12-56-14.json'] e_RT = aba.loadMultipleDataFiles(e_RT) e_novel = ['/home/vburns/Dropbox/ConchisData/2013-01-30/f00117/f00117_2013-01-30-13-44-11.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00118/f00118_2013-01-30-13-44-35.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00119/f00119_2013-01-30-13-45-09.json', '/home/vburns/Dropbox/ConchisData/2013-01-30/f00120/f00120_2013-01-30-13-45-26.json'] e_novel = aba.loadMultipleDataFiles(e_novel) e_shock2 = ['/home/vburns/Dropbox/ConchisData/2013-01-31/f00125/f00125_2013-01-31-08-56-19.json', '/home/vburns/Dropbox/ConchisData/2013-01-31/f00126/f00126_2013-01-31-08-56-22.json',
import matplotlib as mpl import matplotlib.pyplot as pyplot import pylab import scipy allfish = [ '/home/vburns/Dropbox/ConchisData/2013-04-21/f00350/f00350_2013-04-21-14-01-18.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00351/f00351_2013-04-21-14-01-30.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00352/f00352_2013-04-21-14-01-39.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00353/f00353_2013-04-21-14-01-52.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00354/f00354_2013-04-21-13-56-28.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00355/f00355_2013-04-21-13-56-25.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00356/f00356_2013-04-21-13-56-23.json', '/home/vburns/Dropbox/ConchisData/2013-04-21/f00357/f00357_2013-04-21-13-56-21.json' ] allfish = aba.loadMultipleDataFiles(allfish) sm = 15 sections = 15 fish_vel0 = aba.getMedianVelMulti(allfish, (0,900), smoothWinLen=sm) fish_vel1 = aba.getMedianVelMulti(allfish, (900,1800), smoothWinLen=sm) fish_vel2 = aba.getMedianVelMulti(allfish, (1800,2700), smoothWinLen=sm) fish_vel3 = aba.getMedianVelMulti(allfish, (2700,3600), smoothWinLen=sm) vel0 = np.array([np.array([fish_vel0[n]]) for n in range(len(fish_vel0))]) vel1 = np.array([np.array([fish_vel1[n]]) for n in range(len(fish_vel1))]) vel2 = np.array([np.array([fish_vel2[n]]) for n in range(len(fish_vel2))]) vel3 = np.array([np.array([fish_vel3[n]]) for n in range(len(fish_vel3))]) allvelocity = np.transpose(np.hstack((vel0, vel1, vel2, vel3)))
# '/home/vburns/Dropbox/ConchisData/2013-05-15/f00424/f00424_2013-05-15-14-37-25.json',#low starting velocity # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00425/f00425_2013-05-15-14-37-21.json', #problem with plotting ##CHECKCHECK '/home/vburns/Dropbox/ConchisData/2013-05-15/f00426/f00426_2013-05-15-14-40-23.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00427/f00427_2013-05-15-14-40-20.json', #current imbalance '/home/vburns/Dropbox/ConchisData/2013-05-15/f00428/f00428_2013-05-15-14-40-18.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00429/f00429_2013-05-15-14-40-13.json', #tracking in sec? '/home/vburns/Dropbox/ConchisData/2013-05-16/f00430/f00430_2013-05-16-10-04-07.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00431/f00431_2013-05-16-10-04-05.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00432/f00432_2013-05-16-10-04-03.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00433/f00433_2013-05-16-10-04-01.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00434/f00434_2013-05-16-10-05-40.json', # '/home/vburns/Dropbox/ConchisData/2013-05-16/f00435/f00435_2013-05-16-10-05-42.json', #low starting velocity '/home/vburns/Dropbox/ConchisData/2013-05-16/f00436/f00436_2013-05-16-10-05-45.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00437/f00437_2013-05-16-10-05-47.json', ] e_water_first = aba.loadMultipleDataFiles(e_water_first) #this is new water in shock tank e_water_shock = [ '/home/vburns/Dropbox/ConchisData/2013-05-15/f00422/f00422_2013-05-15-15-08-23.json', '/home/vburns/Dropbox/ConchisData/2013-05-15/f00423/f00423_2013-05-15-15-08-34.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00424/f00424_2013-05-15-15-08-45.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00425/f00425_2013-05-15-15-08-54.json', '/home/vburns/Dropbox/ConchisData/2013-05-15/f00426/f00426_2013-05-15-15-11-28.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00427/f00427_2013-05-15-15-11-35.json', '/home/vburns/Dropbox/ConchisData/2013-05-15/f00428/f00428_2013-05-15-15-11-41.json', # '/home/vburns/Dropbox/ConchisData/2013-05-15/f00429/f00429_2013-05-15-15-11-46.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00430/f00430_2013-05-16-10-35-52.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00431/f00431_2013-05-16-10-35-47.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00432/f00432_2013-05-16-10-35-40.json', '/home/vburns/Dropbox/ConchisData/2013-05-16/f00433/f00433_2013-05-16-10-35-34.json',
'/home/vburns/Dropbox/ConchisData/2014-02-12/f00889/f00889_2014-02-12-09-55-46.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00890/f00890_2014-02-12-09-55-49.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00891/f00891_2014-02-12-09-55-51.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00892/f00892_2014-02-12-09-55-54.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00893/f00893_2014-02-12-09-55-57.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00894/f00894_2014-02-12-09-56-00.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00895/f00895_2014-02-12-09-56-02.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00896/f00896_2014-02-12-09-56-05.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00897/f00897_2014-02-12-09-57-24.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00898/f00898_2014-02-12-09-57-29.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00899/f00899_2014-02-12-09-57-32.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00900/f00900_2014-02-12-09-57-35.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00901/f00901_2014-02-12-09-57-38.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00902/f00902_2014-02-12-09-57-41.json', ] five_fluox_first = aba.loadMultipleDataFiles(five_fluox_first) five_fluox_sec = [ '/home/vburns/Dropbox/ConchisData/2014-02-12/f00889/f00889_2014-02-12-10-51-36.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00890/f00890_2014-02-12-10-51-31.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00891/f00891_2014-02-12-10-51-25.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00892/f00892_2014-02-12-10-51-20.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00893/f00893_2014-02-12-10-51-14.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00894/f00894_2014-02-12-10-51-07.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00895/f00895_2014-02-12-10-50-59.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00896/f00896_2014-02-12-10-50-55.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00897/f00897_2014-02-12-10-53-20.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00898/f00898_2014-02-12-10-53-07.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00899/f00899_2014-02-12-10-52-53.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00900/f00900_2014-02-12-10-52-35.json', '/home/vburns/Dropbox/ConchisData/2014-02-12/f00901/f00901_2014-02-12-10-52-25.json',
import ArenaBehaviorAnalysis as aba import pylab import numpy as np e_pre_f_multi = '/home/vburns/Dropbox/ConchisData/2012-12-21/f00022/f00022_2012-12-21-10-07-32.json' e_pre_f = ['/home/vburns/Dropbox/ConchisData/2012-12-21/f00024/f00024_2012-12-21-10-07-38.json', '/home/vburns/Dropbox/ConchisData/2012-12-21/f00027/f00027_2012-12-21-10-07-46.json', '/home/vburns/Dropbox/ConchisData/2012-12-21/f00029/f00029_2012-12-21-10-07-51.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00042/f00042_2013-01-03-11-26-35.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00043/f00043_2013-01-03-11-26-32.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00044/f00044_2013-01-03-11-26-30.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00045/f00045_2013-01-03-11-26-27.json'] e_pre = aba.loadMultipleDataFiles(e_pre_f) e_temp = aba.loadDataFromFile_AvgMultiFish(e_pre_f_multi) e_pre = [e_temp] + e_pre e_postM_f = '/home/vburns/Dropbox/ConchisData/2012-12-21/f00022/f00022_2012-12-21-13-23-49.json' e_post_f = ['/home/vburns/Dropbox/ConchisData/2012-12-21/f00024/f00024_2012-12-21-13-24-03.json', '/home/vburns/Dropbox/ConchisData/2012-12-21/f00027/f00027_2012-12-21-13-25-17.json', '/home/vburns/Dropbox/ConchisData/2012-12-21/f00029/f00029_2012-12-21-13-25-49.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00042/f00042_2013-01-03-13-52-59.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00043/f00043_2013-01-03-13-53-02.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00044/f00044_2013-01-03-13-53-04.json', '/home/vburns/Dropbox/ConchisData/2013-01-03/f00045/f00045_2013-01-03-13-53-06.json'] e_temp2 = aba.loadDataFromFile_AvgMultiFish(e_postM_f) e_post = aba.loadMultipleDataFiles(e_post_f) e_post = [e_temp2] + e_post c_pre_f = ['/home/vburns/Dropbox/ConchisData/2013-01-14/f00080/f00080_2013-01-14-12-17-49.json', '/home/vburns/Dropbox/ConchisData/2013-01-14/f00081/f00081_2013-01-14-12-17-52.json', '/home/vburns/Dropbox/ConchisData/2013-01-14/f00082/f00082_2013-01-14-12-17-55.json',
'/home/vburns/Dropbox/ConchisData/2013-05-06/f00392/f00392_2013-05-06-10-19-39.json', # '/home/vburns/Dropbox/ConchisData/2013-05-06/f00393/f00393_2013-05-06-10-19-47.json', #red color '/home/vburns/Dropbox/ConchisData/2013-05-06/f00394/f00394_2013-05-06-10-21-26.json', # '/home/vburns/Dropbox/ConchisData/2013-05-06/f00395/f00395_2013-05-06-10-21-17.json', #low velocity '/home/vburns/Dropbox/ConchisData/2013-05-06/f00396/f00396_2013-05-06-10-21-06.json', '/home/vburns/Dropbox/ConchisData/2013-05-06/f00397/f00397_2013-05-06-10-21-03.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00406/f00406_2013-05-07-14-18-31.json', # '/home/vburns/Dropbox/ConchisData/2013-05-07/f00407/f00407_2013-05-07-14-18-22.json', #current imbalance '/home/vburns/Dropbox/ConchisData/2013-05-07/f00408/f00408_2013-05-07-14-18-20.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00409/f00409_2013-05-07-14-18-18.json', # '/home/vburns/Dropbox/ConchisData/2013-05-07/f00410/f00410_2013-05-07-14-15-15.json', #tracking '/home/vburns/Dropbox/ConchisData/2013-05-07/f00411/f00411_2013-05-07-14-15-17.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00412/f00412_2013-05-07-14-15-19.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00413/f00413_2013-05-07-14-15-21.json', ] e_safe_first = aba.loadMultipleDataFiles(e_safe_first) e_safe_shock = [ '/home/vburns/Dropbox/ConchisData/2013-05-06/f00390/f00390_2013-05-06-10-55-27.json', # '/home/vburns/Dropbox/ConchisData/2013-05-06/f00391/f00391_2013-05-06-10-55-29.json', '/home/vburns/Dropbox/ConchisData/2013-05-06/f00392/f00392_2013-05-06-10-55-31.json', # '/home/vburns/Dropbox/ConchisData/2013-05-06/f00393/f00393_2013-05-06-10-55-33.json', '/home/vburns/Dropbox/ConchisData/2013-05-06/f00394/f00394_2013-05-06-10-56-35.json', # '/home/vburns/Dropbox/ConchisData/2013-05-06/f00395/f00395_2013-05-06-10-56-33.json', '/home/vburns/Dropbox/ConchisData/2013-05-06/f00396/f00396_2013-05-06-10-56-31.json', '/home/vburns/Dropbox/ConchisData/2013-05-06/f00397/f00397_2013-05-06-10-56-29.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00406/f00406_2013-05-07-14-49-23.json', # '/home/vburns/Dropbox/ConchisData/2013-05-07/f00407/f00407_2013-05-07-14-49-29.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00408/f00408_2013-05-07-14-49-35.json', '/home/vburns/Dropbox/ConchisData/2013-05-07/f00409/f00409_2013-05-07-14-49-43.json', # '/home/vburns/Dropbox/ConchisData/2013-05-07/f00410/f00410_2013-05-07-14-46-49.json',
'/home/vburns/Dropbox/ConchisData/2013-06-13/f00516/f00516_2013-06-13-13-22-37.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00517/f00517_2013-06-13-13-22-45.json', # '/home/vburns/Dropbox/ConchisData/2013-06-13/f00518/f00518_2013-06-13-13-25-44.json', #low starting velocity # '/home/vburns/Dropbox/ConchisData/2013-06-13/f00519/f00519_2013-06-13-13-25-49.json', #low starting velocity '/home/vburns/Dropbox/ConchisData/2013-06-13/f00520/f00520_2013-06-13-13-25-55.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00521/f00521_2013-06-13-13-26-01.json', # '/home/vburns/Dropbox/ConchisData/2013-06-14/f00530/f00530_2013-06-14-13-15-42.json', #poor tracking? '/home/vburns/Dropbox/ConchisData/2013-06-14/f00531/f00531_2013-06-14-13-15-48.json', '/home/vburns/Dropbox/ConchisData/2013-06-14/f00532/f00532_2013-06-14-13-15-57.json', '/home/vburns/Dropbox/ConchisData/2013-06-14/f00533/f00533_2013-06-14-13-16-07.json', #'/home/vburns/Dropbox/ConchisData/2013-06-14/f00534/f00534_2013-06-14-13-17-09.json', #current imbalance '/home/vburns/Dropbox/ConchisData/2013-06-14/f00535/f00535_2013-06-14-13-17-18.json', '/home/vburns/Dropbox/ConchisData/2013-06-14/f00536/f00536_2013-06-14-13-17-30.json', # '/home/vburns/Dropbox/ConchisData/2013-06-14/f00537/f00537_2013-06-14-13-17-34.json', #low velocity in base ] e_safe5_first = aba.loadMultipleDataFiles(e_safe5_first) e_shock5 = [ '/home/vburns/Dropbox/ConchisData/2013-06-13/f00514/f00514_2013-06-13-13-54-27.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00515/f00515_2013-06-13-13-54-20.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00516/f00516_2013-06-13-13-54-11.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00517/f00517_2013-06-13-13-53-54.json', # '/home/vburns/Dropbox/ConchisData/2013-06-13/f00518/f00518_2013-06-13-13-57-02.json', # '/home/vburns/Dropbox/ConchisData/2013-06-13/f00519/f00519_2013-06-13-13-57-11.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00520/f00520_2013-06-13-13-57-25.json', '/home/vburns/Dropbox/ConchisData/2013-06-13/f00521/f00521_2013-06-13-13-57-43.json', # '/home/vburns/Dropbox/ConchisData/2013-06-14/f00530/f00530_2013-06-14-13-48-02.json', '/home/vburns/Dropbox/ConchisData/2013-06-14/f00531/f00531_2013-06-14-13-47-54.json', '/home/vburns/Dropbox/ConchisData/2013-06-14/f00532/f00532_2013-06-14-13-47-47.json', '/home/vburns/Dropbox/ConchisData/2013-06-14/f00533/f00533_2013-06-14-13-47-41.json', #'/home/vburns/Dropbox/ConchisData/2013-06-14/f00534/f00534_2013-06-14-13-49-17.json',
import ArenaBehaviorAnalysis as aba import pylab import numpy as np import matplotlib as mpl import matplotlib.pyplot as pyplot #first 15 min is baseline, then 60 bouts of 60 sec shocking (30 bouts total), then 5 min post #bottom of novel tanks were changed to red e_shockR = [ '/home/vburns/Dropbox/ConchisData/2013-03-24/f00233/f00233_2013-03-24-15-21-51.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00234/f00234_2013-03-24-15-22-03.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00236/f00236_2013-03-24-15-19-48.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00237/f00237_2013-03-24-15-19-47.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00238/f00238_2013-03-24-15-19-45.json', ] e_shockR = aba.loadMultipleDataFiles(e_shockR) e_shockS = [ '/home/vburns/Dropbox/ConchisData/2013-03-24/f00233/f00233_2013-03-24-16-15-39.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00234/f00234_2013-03-24-16-15-47.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00236/f00236_2013-03-24-16-14-42.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00237/f00237_2013-03-24-16-14-44.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00238/f00238_2013-03-24-16-14-46.json' ] e_shockS= aba.loadMultipleDataFiles(e_shockS) e_shockN = [ '/home/vburns/Dropbox/ConchisData/2013-03-24/f00233/f00233_2013-03-24-17-21-14.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00234/f00234_2013-03-24-17-21-21.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00236/f00236_2013-03-24-17-19-52.json', '/home/vburns/Dropbox/ConchisData/2013-03-24/f00237/f00237_2013-03-24-17-19-50.json',
import matplotlib.pyplot as pyplot import scipy import os #control fish moved to shock water control_first = [ '/home/vburns/Dropbox/ConchisData/2014-03-06/f01105/f01105_2014-03-06-10-20-43.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01106/f01106_2014-03-06-10-20-39.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01107/f01107_2014-03-06-10-20-34.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01108/f01108_2014-03-06-10-20-28.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01109/f01109_2014-03-06-10-20-23.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01110/f01110_2014-03-06-10-20-16.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01111/f01111_2014-03-06-10-20-11.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01112/f01112_2014-03-06-10-20-06.json', ] control_first = aba.loadMultipleDataFiles(control_first) control_sec =[ '/home/vburns/Dropbox/ConchisData/2014-03-06/f01105/f01105_2014-03-06-11-16-23.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01106/f01106_2014-03-06-11-16-29.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01107/f01107_2014-03-06-11-16-34.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01108/f01108_2014-03-06-11-16-40.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01109/f01109_2014-03-06-11-16-48.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01110/f01110_2014-03-06-11-16-53.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01111/f01111_2014-03-06-11-17-01.json', '/home/vburns/Dropbox/ConchisData/2014-03-06/f01112/f01112_2014-03-06-11-17-08.json', ] control_sec = aba.loadMultipleDataFiles(control_sec) print "Done loading fish."
import pylab import scipy #first is shocking, second is 15 min in novel context e_shock5 = [ '/home/vburns/Dropbox/ConchisData/2013-03-30/f00263/f00263_2013-03-30-14-13-36.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00264/f00264_2013-03-30-14-13-34.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00265/f00265_2013-03-30-14-13-32.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00266/f00266_2013-03-30-14-13-29.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00267/f00267_2013-03-30-14-15-28.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00268/f00268_2013-03-30-14-15-26.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00269/f00269_2013-03-30-14-15-24.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00270/f00270_2013-03-30-14-15-21.json', ] e_shock5 = aba.loadMultipleDataFiles(e_shock5) e_shock25 = [ '/home/vburns/Dropbox/ConchisData/2013-03-30/f00271/f00271_2013-03-30-15-33-25.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00272/f00272_2013-03-30-15-33-27.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00273/f00273_2013-03-30-15-33-29.json', # '/home/vburns/Dropbox/ConchisData/2013-03-30/f00274/f00274_2013-03-30-15-33-31.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00275/f00275_2013-03-30-15-35-03.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00276/f00276_2013-03-30-15-35-01.json', '/home/vburns/Dropbox/ConchisData/2013-03-30/f00277/f00277_2013-03-30-15-34-59.json', # '/home/vburns/Dropbox/ConchisData/2013-03-30/f00278/f00278_2013-03-30-15-34-57.json', ] e_shock25= aba.loadMultipleDataFiles(e_shock25) e_novel5 = [ '/home/vburns/Dropbox/ConchisData/2013-03-30/f00263/f00263_2013-03-30-15-06-08.json',
'/home/vburns/Dropbox/ConchisData/2013-09-27/f00611/f00611_2013-09-27-10-23-07.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00612/f00612_2013-09-27-10-23-02.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00613/f00613_2013-09-27-10-22-56.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00614/f00615_2013-09-27-10-22-51.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00615/f00615_2013-09-27-10-22-46.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00616/f00616_2013-09-27-10-22-42.json', #current imbalance '/home/vburns/Dropbox/ConchisData/2013-09-27/f00617/f00617_2013-09-27-10-32-05.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00618/f00616_2013-09-27-10-31-57.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00619/f00619_2013-09-27-10-31-48.json',#current imbalance '/home/vburns/Dropbox/ConchisData/2013-09-27/f00620/f00620_2013-09-27-10-31-38.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00621/f00621_2013-09-27-10-31-30.json', #current imbalance '/home/vburns/Dropbox/ConchisData/2013-09-27/f00622/f00622_2013-09-27-10-31-22.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00623/f00623_2013-09-27-10-31-15.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00624/f00624_2013-09-27-10-31-05.json' ] e_omr = aba.loadMultipleDataFiles(e_omr) e_post_omr = [ # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00609/f00609_2013-09-27-11-25-24.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00610/f00610_2013-09-27-11-25-49.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00611/f00611_2013-09-27-11-26-04.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00612/f00612_2013-09-27-11-26-20.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00613/f00613_2013-09-27-11-26-35.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00614/f00614_2013-09-27-11-27-06.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00615/f00615_2013-09-27-11-27-22.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00616/f00616_2013-09-27-11-27-37.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00617/f00617_2013-09-27-11-28-37.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00618/f00618_2013-09-27-11-28-52.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00619/f00619_2013-09-27-11-29-07.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00620/f00620_2013-09-27-11-29-17.json', '/home/vburns/Dropbox/ConchisData/2013-09-27/f00621/f00621_2013-09-27-11-29-31.json',
# '/home/vburns/Dropbox/ConchisData/2013-09-27/f00627/f00627_2013-09-27-14-19-21.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00628/f00628_2013-09-27-14-19-17.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00629/f00629_2013-09-27-14-19-13.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00630/f00630_2013-09-27-14-19-08.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00631/f00631_2013-09-27-14-19-04.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00632/f00632_2013-09-27-14-18-59.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00633/f00633_2013-09-27-14-22-01.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00634/f00634_2013-09-27-14-22-09.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00635/f00635_2013-09-27-14-22-17.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00636/f00636_2013-09-27-14-22-30.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00637/f00637_2013-09-27-14-22-43.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00638/f00638_2013-09-27-14-22-53.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00639/f00639_2013-09-27-14-23-03.json', # '/home/vburns/Dropbox/ConchisData/2013-09-27/f00640/f00640_2013-09-27-14-23-12.json' ] c_omr_5mm = aba.loadMultipleDataFiles(c_omr_5mm) c_omr_2mm = ['/home/vburns/Dropbox/ConchisData/2013-09-30/f00649/f00649_2013-09-30-11-30-50.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00650/f00650_2013-09-30-11-31-37.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00651/f00651_2013-09-30-11-31-42.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00652/f00652_2013-09-30-11-31-52.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00653/f00653_2013-09-30-11-32-07.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00654/f00654_2013-09-30-11-32-17.json', #'/home/vburns/Dropbox/ConchisData/2013-09-30/f00655/f00655_2013-09-30-11-32-24.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00656/f00656_2013-09-30-11-32-31.json'] c_omr_2mm = aba.loadMultipleDataFiles(c_omr_2mm) c_omr_8mm_slow = ['/home/vburns/Dropbox/ConchisData/2013-09-30/f00657/f00657_2013-09-30-14-30-02.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00658/f00658_2013-09-30-14-30-12.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00659/f00659_2013-09-30-14-30-20.json', '/home/vburns/Dropbox/ConchisData/2013-09-30/f00660/f00660_2013-09-30-14-30-26.json',
'/Users/andalman/Dropbox/ConchisData/2013-07-10/f00604/f00604_2013-07-10-15-05-42.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00605/f00605_2013-07-10-15-05-42.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00606/f00606_2013-07-10-15-05-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00607/f00607_2013-07-10-15-05-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00608/f00608_2013-07-10-15-05-43.json'] f_sch = ['/Users/andalman/Dropbox/ConchisData/2013-07-10/f00601/f00601_2013-07-10-15-37-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00602/f00602_2013-07-10-15-37-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00603/f00603_2013-07-10-15-37-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00604/f00604_2013-07-10-15-37-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00605/f00605_2013-07-10-15-37-43.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00606/f00606_2013-07-10-15-37-44.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00607/f00607_2013-07-10-15-37-44.json', '/Users/andalman/Dropbox/ConchisData/2013-07-10/f00608/f00608_2013-07-10-15-37-44.json'] d_pre = np.array(aba.loadMultipleDataFiles(f_pre, arena_mm = None)) d_veh = np.array(aba.loadMultipleDataFiles(f_veh, arena_mm = None)) d_sch = np.array(aba.loadMultipleDataFiles(f_sch, arena_mm = None)) ####### QUANTIFY CENTER TYPE whichndx = [1,2,3,4,5,6,7] compare = [[d_pre[whichndx],d_veh[whichndx]],[d_veh[whichndx], d_sch[whichndx]]] trange = [[[1000,1700],[0,360]], [[1000,1700],[0,360]]] titles = ['Vehicle','Schreckstoff'] labels = [['Baseline','Vehicle_Start'],['Vehicle_End','Schreckstoff_Start']] bins = np.linspace(0,300,50) f = pyplot.figure(7) f.set_facecolor('w') mmperpixel=35.0/300 center=(150,150) center_rad = 100