c_RT = ['/home/vburns/Dropbox/ConchisData/2013-02-13/f00143/f00143_2013-02-13-11-43-08.json',
 '/home/vburns/Dropbox/ConchisData/2013-02-13/f00144/f00144_2013-02-13-11-43-06.json',
 '/home/vburns/Dropbox/ConchisData/2013-02-13/f00145/f00145_2013-02-13-11-43-05.json',
 '/home/vburns/Dropbox/ConchisData/2013-02-13/f00146/f00146_2013-02-13-11-43-03.json']
c_RT = aba.loadMultipleDataFiles(c_RT)

c_novel = ['/home/vburns/Dropbox/ConchisData/2013-02-13/f00143/f00143_2013-02-13-12-28-33.json',
 '/home/vburns/Dropbox/ConchisData/2013-02-13/f00144/f00144_2013-02-13-12-28-27.json',
 '/home/vburns/Dropbox/ConchisData/2013-02-13/f00145/f00145_2013-02-13-12-28-22.json',
 '/home/vburns/Dropbox/ConchisData/2013-02-13/f00146/f00146_2013-02-13-12-28-15.json']
c_novel = aba.loadMultipleDataFiles(c_novel)
"""
import pylab
#Real time avoidance statistics following extended shock (learned helplessness)
(e_fracRT,e_distRT) = aba.getSidePreference_Multi(e_RTN)
(e_fracRT2, e_distRT2) = aba.getSidePreference_Multi(e_RTR)
#(c_fracRT,c_distRT) = aba.getSidePreference_Multi(c_RT)


import scipy
[tv, e_fracRT_stat] = scipy.stats.ttest_1samp(np.mean(e_fracRT, axis = 1), 0.5)
[tv, e_distRT_stat] = scipy.stats.ttest_1samp(np.mean(e_distRT, axis = 1), 24)
[tv, e_fracRT2_stat] = scipy.stats.ttest_1samp(np.mean(e_fracRT2, axis = 1), 0.5)
[tv, e_distRT2_stat] = scipy.stats.ttest_1samp(np.mean(e_distRT2, axis = 1), 24)

print 'Avoidance Post LH_5V 14dpf with pipetting (frac, distance): ', e_fracRT_stat, e_distRT_stat
print 'Avoidance Post LH_5V 14dpf, tested in new context (frac, distance):', e_fracRT2_stat, e_distRT2_stat

ae_f = np.mean(e_fracRT,1)
#ac_f = np.mean(c_fracRT,1)
예제 #2
0
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")
(e_frac_oR, e_dist_oR) = aba.getSidePreference_Multi(e_fish_oldR, cond=[8, 8], refState="Red")

e_young_frac = np.append(e_frac_yNR, e_frac_yR, axis=0)
e_old_frac = np.append(e_frac_oNR, e_frac_oR, axis=0)
e_young_dist = np.append(e_dist_yNR, e_dist_yR, axis=0)
e_old_dist = np.append(e_dist_oNR, e_dist_oR, axis=0)

import scipy

[tv, e_yfrac] = scipy.stats.ttest_1samp(np.mean(e_young_frac, axis=1), 0.5)
[tv, e_ofrac] = scipy.stats.ttest_1samp(np.mean(e_old_frac, axis=1), 0.5)
[tv, e_ydist] = scipy.stats.ttest_1samp(np.mean(e_young_dist, axis=1), 24)
[tv, e_odist] = scipy.stats.ttest_1samp(np.mean(e_old_dist, axis=1), 24)
e_pre_ten =['/home/vburns/Dropbox/ConchisData/2013-01-29/f00109/f00109_2013-01-29-10-59-53.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-29/f00110/f00110_2013-01-29-10-59-51.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-29/f00111/f00111_2013-01-29-10-59-48.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-29/f00112/f00112_2013-01-29-10-59-46.json'] 
e_pre_ten = aba.loadMultipleDataFiles(e_pre_ten)

e_post_ten = ['/home/vburns/Dropbox/ConchisData/2013-01-29/f00109/f00109_2013-01-29-13-35-23.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-29/f00110/f00110_2013-01-29-13-35-21.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-29/f00111/f00111_2013-01-29-13-35-19.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-29/f00112/f00112_2013-01-29-13-35-17.json']
e_post_ten = aba.loadMultipleDataFiles(e_post_ten)

print asdf
#assumes cocaine is on red
(e_pre_frac,e_pre_dist) = aba.getSidePreference_Multi(e_pre, cond = [3,8], refState ='Red')
(c_pre_frac,c_pre_dist) = aba.getSidePreference_Multi(c_pre, cond = [3,8], refState = 'Red')

(e_post_frac,e_post_dist) = aba.getSidePreference_Multi(e_post, cond = [3,8], refState ='Red')
(c_post_frac,c_post_dist) = aba.getSidePreference_Multi(c_post, cond = [3,8], refState = 'Red')

(e_prel_frac,e_prel_dist) = aba.getSidePreference_Multi(e_low_pre, cond = [3,8], refState ='Red')
(e_postl_frac,e_postl_dist) = aba.getSidePreference_Multi(e_low_post, cond = [3,8], refState = 'Red')

(e_pre1_frac,e_pre1_dist) = aba.getSidePreference_Multi(e_pre_one, cond = [3,8], refState ='Red')
(e_post1_frac,e_post1_dist) = aba.getSidePreference_Multi(e_post_one, cond = [3,8], refState = 'Red')

(e_pre3_frac,e_pre3_dist) = aba.getSidePreference_Multi(e_pre_three, cond = [3,8], refState ='Red')
(e_post3_frac,e_post3_dist) = aba.getSidePreference_Multi(e_post_three, cond = [3,8], refState = 'Red')

(e_prep4_frac,e_prep4_dist) = aba.getSidePreference_Multi(e_pre_pfour, cond = [3,8], refState ='Red')
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)

import scipy
[tv, c_pre_mid] = scipy.stats.ttest_1samp(np.mean(c_frac_pre, axis = 1), 0.5)
[tv, c_post_mid] = scipy.stats.ttest_1samp(np.mean(c_frac_post, axis = 1), 0.5)
[tv, c_pre_post] = scipy.stats.ttest_1samp(np.mean(c_frac_pre, axis = 1) - np.mean(c_frac_post, axis = 1), 0)
 u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00048/f00048_2013-01-09-18-24-24.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00049/f00049_2013-01-09-18-24-26.json']
c_test = aba.loadMultipleDataFiles(c_test_f)

c_lh_f = [u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00072/f00072_2013-01-10-16-39-43.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00073/f00073_2013-01-10-16-39-40.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00074/f00074_2013-01-10-16-39-38.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-10/f00075/f00075_2013-01-10-16-39-36.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00046/f00046_2013-01-09-16-25-41.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00047/f00047_2013-01-09-16-25-43.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00048/f00048_2013-01-09-16-25-45.json',
 u'/Users/andalman/Dropbox/ConchisData/2013-01-09/f00049/f00049_2013-01-09-16-25-48.json']
c_lh = aba.loadMultipleDataFiles(c_lh_f)

#Real time avoidance statistics following extended shock (learned helplessness)
(e_fracTimeOnShock,e_distFromShock) = aba.getSidePreference_Multi(e_test)
(c_fracTimeOnShock,c_distFromShock) = aba.getSidePreference_Multi(c_test)

#n is an animal
import scipy
[t,p_e_time] = scipy.stats.ttest_1samp(np.mean(e_fracTimeOnShock,1),.5)
[t,p_c_time] = scipy.stats.ttest_1samp(np.mean(c_fracTimeOnShock,1),.5)
[t,p_e_dist] = scipy.stats.ttest_1samp(np.mean(e_distFromShock,1),24)
[t,p_c_dist] = scipy.stats.ttest_1samp(np.mean(c_distFromShock,1),24)
[t,p_time_diff] = scipy.stats.ttest_ind(np.mean(e_fracTimeOnShock,1), np.mean(c_fracTimeOnShock,1))
[t,p_dist_diff] = scipy.stats.ttest_ind(np.mean(e_distFromShock,1), np.mean(c_distFromShock,1))
print 'BY ANIMAL Avoidance Post LH_5V      p_frac,p_dist: ', p_e_time, p_e_dist
print 'BY ANIMAL Avoidance Post LH_CONTROL p_frac,p_dist: ', p_c_time, p_c_dist
print 'BY ANIMAL Controls diff from Exper (time,dist): ', p_time_diff, p_dist_diff 
ae_f = np.mean(e_fracTimeOnShock,1)
ac_f = np.mean(c_fracTimeOnShock,1)
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]

c_fish = ['/home/vburns/Dropbox/ConchisData/2013-01-10/f00072/f00072_2013-01-10-17-16-45.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-10/f00073/f00073_2013-01-10-17-16-42.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-10/f00074/f00074_2013-01-10-17-16-39.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-10/f00075/f00075_2013-01-10-17-16-36.json']
c_fish = aba.loadMultipleDataFiles(c_fish)

#Real time avoidance statistics following extended shock (learned helplessness)
(ef_frac,ef_dist) = aba.getSidePreference_Multi(f_fish)
(et_frac,et_dist) = aba.getSidePreference_Multi(t_fish)
(c_frac, c_dist) = aba.getSidePreference_Multi(c_fish)

import scipy
[tv, ef_frac_stat] = scipy.stats.ttest_1samp(np.mean(ef_frac, axis = 1), 0.5)
[tv, et_frac_stat] = scipy.stats.ttest_1samp(np.mean(et_frac, axis = 1), 0.5)
[tv, ef_dist_stat] = scipy.stats.ttest_1samp(np.mean(ef_dist, axis = 1), 24)
[tv, et_dist_stat] = scipy.stats.ttest_1samp(np.mean(et_dist, axis = 1), 24)
[tv, c_frac_stat] = scipy.stats.ttest_1samp(np.mean(c_frac, axis = 1), 0.5)
[tv, c_dist_stat] = scipy.stats.ttest_1samp(np.mean(c_dist, axis = 1), 24)
[t, time_diff_five] = scipy.stats.ttest_ind(np.mean(ef_frac,1), np.mean(c_frac,1))
[t, time_diff_old] = scipy.stats.ttest_ind(np.mean(et_frac,1), np.mean(c_frac,1))
[t, dist_diff_five] = scipy.stats.ttest_ind(np.mean(ef_dist,1), np.mean(c_dist,1))
[t, dist_diff_old] = scipy.stats.ttest_ind(np.mean(et_dist,1), np.mean(c_dist,1))
예제 #7
0
c_shock = aba.loadMultipleDataFiles(c_shock)

c_RT = ['/home/vburns/Dropbox/ConchisData/2013-01-30/f00121/f00121_2013-01-30-16-00-05.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-30/f00122/f00122_2013-01-30-16-00-02.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-30/f00123/f00123_2013-01-30-16-00-00.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-30/f00124/f00124_2013-01-30-15-59-57.json']
c_RT = aba.loadMultipleDataFiles(c_RT)

c_novel = ['/home/vburns/Dropbox/ConchisData/2013-01-30/f00122/f00122_2013-01-30-16-40-59.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-30/f00123/f00123_2013-01-30-16-39-29.json',
 '/home/vburns/Dropbox/ConchisData/2013-01-30/f00124/f00124_2013-01-30-16-39-11.json']
c_novel = aba.loadMultipleDataFiles(c_novel)

import pylab
#Real time avoidance statistics following extended shock (learned helplessness)
(e_fracShock,e_distShock) = aba.getSidePreference_Multi(e_shock)
(e_fracRT,e_distRT) = aba.getSidePreference_Multi(e_RT)
(e_fracNov,e_distNov) = aba.getSidePreference_Multi(e_novel)

(e_fracShock2,e_distShock2) = aba.getSidePreference_Multi(e_shock2)
(e_fracRT2,e_distRT2) = aba.getSidePreference_Multi(e_RT2)
(e_fracNov2,e_distNov2) = aba.getSidePreference_Multi(e_novel2)

(c_fracRT,c_distRT) = aba.getSidePreference_Multi(c_RT)
(c_fracShock, c_distShock) = aba.getSidePreference_Multi(c_shock)
(c_fracNov,c_distNov) = aba.getSidePreference_Multi(c_novel)

import scipy
[tv, e_fracRT_stat] = scipy.stats.ttest_1samp(np.mean(e_fracRT, axis = 1), 0.5)
[tv, e_distRT_stat] = scipy.stats.ttest_1samp(np.mean(e_distRT, axis = 1), 24)
[tv, e_fracRT2_stat] = scipy.stats.ttest_1samp(np.mean(e_fracRT2, axis = 1), 0.5)