Skip to content

Commit dd4fea3

Browse files
committed
Merge branch 'release/2.2.0'
2 parents 93be6b9 + de897d4 commit dd4fea3

28 files changed

+962
-420
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include ibllib/atlas/allen_structure_tree.csv
22
include ibllib/atlas/beryl.npy
3+
include ibllib/atlas/cosmos.npy
34
include ibllib/io/extractors/extractor_types.json
45
include brainbox/tests/wheel_test.p
56
recursive-include brainbox/tests/fixtures *

brainbox/behavior/training.py

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import logging
21
from one.api import ONE
32
import datetime
43
import re
54
import numpy as np
65
from iblutil.util import Bunch
76
import brainbox.behavior.pyschofit as psy
8-
9-
logger = logging.getLogger('ibllib')
7+
import logging
8+
_logger = logging.getLogger('ibllib')
109

1110

1211
def get_lab_training_status(lab, date=None, details=True, one=None):
@@ -110,7 +109,7 @@ def get_sessions(subj, date=None, one=None):
110109

111110
# If still 0 sessions then return with warning
112111
if len(sessions) == 0:
113-
logger.warning(f"No training sessions detected for {subj}")
112+
_logger.warning(f"No training sessions detected for {subj}")
114113
return [None] * 4
115114

116115
trials = Bunch()
@@ -274,30 +273,30 @@ def display_status(subj, sess_dates, status, perf_easy=None, n_trials=None, psyc
274273
"""
275274

276275
if perf_easy is None:
277-
logger.info(f"\n{subj} : {status} \nSession dates=[{sess_dates[0]}, {sess_dates[1]}, "
278-
f"{sess_dates[2]}]")
276+
print(f"\n{subj} : {status} \nSession dates=[{sess_dates[0]}, {sess_dates[1]}, "
277+
f"{sess_dates[2]}]")
279278
elif psych_20 is None:
280-
logger.info(f"\n{subj} : {status} \nSession dates={[x for x in sess_dates]}, "
281-
f"Perf easy={[np.around(pe,2) for pe in perf_easy]}, "
282-
f"N trials={[nt for nt in n_trials]} "
283-
f"\nPsych fit over last 3 sessions: "
284-
f"bias={np.around(psych[0],2)}, thres={np.around(psych[1],2)}, "
285-
f"lapse_low={np.around(psych[2],2)}, lapse_high={np.around(psych[3],2)} "
286-
f"\nMedian reaction time at 0 contrast over last 3 sessions = "
287-
f"{np.around(rt,2)}")
279+
print(f"\n{subj} : {status} \nSession dates={[x for x in sess_dates]}, "
280+
f"Perf easy={[np.around(pe,2) for pe in perf_easy]}, "
281+
f"N trials={[nt for nt in n_trials]} "
282+
f"\nPsych fit over last 3 sessions: "
283+
f"bias={np.around(psych[0],2)}, thres={np.around(psych[1],2)}, "
284+
f"lapse_low={np.around(psych[2],2)}, lapse_high={np.around(psych[3],2)} "
285+
f"\nMedian reaction time at 0 contrast over last 3 sessions = "
286+
f"{np.around(rt,2)}")
288287

289288
else:
290-
logger.info(f"\n{subj} : {status} \nSession dates={[x for x in sess_dates]}, "
291-
f"Perf easy={[np.around(pe,2) for pe in perf_easy]}, "
292-
f"N trials={[nt for nt in n_trials]} "
293-
f"\nPsych fit over last 3 sessions (20): "
294-
f"bias={np.around(psych_20[0],2)}, thres={np.around(psych_20[1],2)}, "
295-
f"lapse_low={np.around(psych_20[2],2)}, lapse_high={np.around(psych_20[3],2)} "
296-
f"\nPsych fit over last 3 sessions (80): bias={np.around(psych_80[0],2)}, "
297-
f"thres={np.around(psych_80[1],2)}, lapse_low={np.around(psych_80[2],2)}, "
298-
f"lapse_high={np.around(psych_80[3],2)} "
299-
f"\nMedian reaction time at 0 contrast over last 3 sessions = "
300-
f"{np.around(rt, 2)}")
289+
print(f"\n{subj} : {status} \nSession dates={[x for x in sess_dates]}, "
290+
f"Perf easy={[np.around(pe,2) for pe in perf_easy]}, "
291+
f"N trials={[nt for nt in n_trials]} "
292+
f"\nPsych fit over last 3 sessions (20): "
293+
f"bias={np.around(psych_20[0],2)}, thres={np.around(psych_20[1],2)}, "
294+
f"lapse_low={np.around(psych_20[2],2)}, lapse_high={np.around(psych_20[3],2)} "
295+
f"\nPsych fit over last 3 sessions (80): bias={np.around(psych_80[0],2)}, "
296+
f"thres={np.around(psych_80[1],2)}, lapse_low={np.around(psych_80[2],2)}, "
297+
f"lapse_high={np.around(psych_80[3],2)} "
298+
f"\nMedian reaction time at 0 contrast over last 3 sessions = "
299+
f"{np.around(rt, 2)}")
301300

302301

303302
def concatenate_trials(trials):

0 commit comments

Comments
 (0)