Skip to content

Commit 2f1ba24

Browse files
committed
updating figures
1 parent 7028df5 commit 2f1ba24

File tree

5 files changed

+3491
-1784
lines changed

5 files changed

+3491
-1784
lines changed

alex_dev_script.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import pickle
33
os.chdir('/home/alex.piet/codebase/behavior/licking_behavior')
4-
os.chdir('/Users/alex.piet/licking_behavior')
4+
#os.chdir('/Users/alex.piet/licking_behavior')
55
from alex_utils import load
66
import matplotlib.pyplot as plt
77
import fit_tools
@@ -34,10 +34,10 @@
3434
reward_params = model.res.x[17:37]
3535
flash_params = model.res.x[37:52]
3636
cflash_params = model.res.x[52:67]
37-
params = [flash_params, cflash_params,reward_params,post_lick_params]
38-
durations = [model.flash_duration,model.change_flash_duration,model.reward_duration,model.post_lick_duration]
39-
sigmas = [model.flash_sigma,model.change_flash_sigma,model.reward_sigma,model.post_lick_sigma]
40-
events = [[0, 75,150,225,300,375,450,525],[75],[109],[109, 125,141,157,172, 190,205,230]]
37+
params = [model.res.x[0], flash_params, cflash_params,reward_params,post_lick_params]
38+
durations = [0,model.flash_duration,model.change_flash_duration,model.reward_duration,model.post_lick_duration]
39+
sigmas = [0,model.flash_sigma,model.change_flash_sigma,model.reward_sigma,model.post_lick_sigma]
40+
events = [[],[0, 75,150,225,300,375,450,525],[75],[109],[109, 125,141,157,172, 190,205,230]]
4141
plt.close('all')
4242
reload(plot_tools)
4343
plot_tools.plot_components(params,durations,sigmas,events,5,model.res.x[0])
@@ -57,6 +57,8 @@
5757
plt.close('all')
5858
fit_tools.compare_model(model.res.latent, time_vec, licks, stop_time, rewards=rewards, flashes=flashes, change_flashes=change_flashes, running_speed = running_speed[:-1])
5959

60+
61+
6062
# Sanity Checks
6163
import analysis_tools as at
6264
at.compare_all_inter_licks()

analysis_tools.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,13 @@ def compare_all_inter_licks(IDS=None,plot_this=True):
167167
plt.plot(models, datas, 'ko',alpha = .3)
168168
plt.xlim(0.1,.2)
169169
plt.ylim(0.1,.2)
170-
plt.ylabel('data')
171-
plt.xlabel('model')
170+
plt.ylabel('Average ILI in Data (s)',fontsize=20)
171+
plt.xlabel('Average ILI in Model (s)',fontsize=20)
172172
plt.plot([0,1],[0,1], 'k--',alpha = .2)
173-
plt.title('Interlick Intervals')
173+
plt.title('Interlick Intervals',fontsize=24)
174+
ax = plt.gca()
175+
ax.xaxis.set_tick_params(labelsize=16)
176+
ax.yaxis.set_tick_params(labelsize=16)
174177
return models, datas
175178

176179
def compare_dist(IDS=None, plot_this=True,variable='licks'):

0 commit comments

Comments
 (0)