diff --git a/iblrig/misc.py b/iblrig/misc.py index 70326b30c..8654e73cf 100644 --- a/iblrig/misc.py +++ b/iblrig/misc.py @@ -201,7 +201,7 @@ def get_biased_probs(n: int, idx: int = -1, p_idx: float = 0.5) -> list[float]: return p -def draw_contrast(contrast_set: Iterable[float], +def draw_contrast(contrast_set: list[float], probability_type: Literal["skew_zero", "biased", "uniform"] = "biased", idx: int = -1, idx_probability: float = 0.5) -> float: diff --git a/iblrig/path_helper.py b/iblrig/path_helper.py index 7d59b1edd..73760bd54 100644 --- a/iblrig/path_helper.py +++ b/iblrig/path_helper.py @@ -36,7 +36,8 @@ def iterate_previous_sessions(subject_name, task_name, n=1, **kwargs): if rig_paths.remote_subjects_folder is not None: remote_sessions = _iterate_protocols( rig_paths.remote_subjects_folder.joinpath(subject_name), task_name=task_name, n=n) - sessions.extend(remote_sessions) + if remote_sessions is not None: + sessions.extend(remote_sessions) _, ises = np.unique([s['session_stub'] for s in sessions], return_index=True) sessions = [sessions[i] for i in ises] return sessions