Skip to content

Commit

Permalink
fix for missing remote sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Nov 2, 2023
1 parent fd91923 commit f7e3c42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iblrig/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion iblrig/path_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7e3c42

Please sign in to comment.