Skip to content

Commit 189840b

Browse files
committed
add keys for habituation
1 parent ce241aa commit 189840b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ibllib/pipes/training_status.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from one.api import ONE
21
import one.alf.io as alfio
32
from one.alf.spec import is_session_path
43
from one.alf.exceptions import ALFObjectNotFound
@@ -20,7 +19,6 @@
2019
from datetime import datetime
2120
import seaborn as sns
2221

23-
one = ONE()
2422

2523
TRAINING_STATUS = {'not_computed': (-2, (0, 0, 0, 0)),
2624
'habituation': (-1, (0, 0, 0, 0)),
@@ -303,6 +301,12 @@ def get_training_info_for_session(session_paths, one):
303301
sess_dict['n_delay'] = np.nan
304302
sess_dict['location'] = np.nan
305303
sess_dict['training_status'] = 'habituation'
304+
sess_dict['bias_50'], sess_dict['thres_50'], sess_dict['lapsehigh_50'], sess_dict['lapselow_50'] = \
305+
(np.nan, np.nan, np.nan, np.nan)
306+
sess_dict['bias_20'], sess_dict['thres_20'], sess_dict['lapsehigh_20'], sess_dict['lapselow_20'] = \
307+
(np.nan, np.nan, np.nan, np.nan)
308+
sess_dict['bias_80'], sess_dict['thres_80'], sess_dict['lapsehigh_80'], sess_dict['lapselow_80'] = \
309+
(np.nan, np.nan, np.nan, np.nan)
306310

307311
else:
308312
# if we can't compute trials then we need to pass
@@ -390,7 +394,7 @@ def get_training_info_for_session(session_paths, one):
390394
sess_dict['combined_sess_duration'] = sess_dict['sess_duration']
391395
sess_dict['combined_n_delay'] = sess_dict['n_delay']
392396

393-
for bias in [50, 20, 80]: # TODO check with someone if this is the way to do it
397+
for bias in [50, 20, 80]:
394398
sess_dict[f'combined_bias_{bias}'] = sess_dict[f'bias_{bias}']
395399
sess_dict[f'combined_thres_{bias}'] = sess_dict[f'thres_{bias}']
396400
sess_dict[f'combined_lapsehigh_{bias}'] = sess_dict[f'lapsehigh_{bias}']

0 commit comments

Comments
 (0)