Skip to content

Commit

Permalink
Merge branch 'develop' into release/2.37.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mayofaulkner committed Jun 27, 2024
2 parents 089274b + ddac25b commit a62554b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ibllib/pipes/dynamic_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ def _sync_label(sync, acquisition_software=None, **_):
str
The sync label for determining the extractor tasks.
"""
if sync == 'nidq' and acquisition_software == 'timeline':
return 'timeline'
return sync

return acquisition_software if (sync == 'nidq' and acquisition_software not in ('spikeglx', None)) else sync


def make_pipeline(session_path, **pkwargs):
Expand Down Expand Up @@ -279,15 +278,21 @@ def make_pipeline(session_path, **pkwargs):
# - choice_world_habituation
if 'passiveChoiceWorld' in protocol:
registration_class = btasks.PassiveRegisterRaw
behaviour_class = getattr(btasks, 'PassiveTask' + sync_label.capitalize())
try:
behaviour_class = getattr(btasks, 'PassiveTask' + sync_label.capitalize())
except AttributeError:
raise NotImplementedError(f'No passive task available for sync namespace "{sync_label}"')
compute_status = False
elif 'habituation' in protocol:
registration_class = btasks.HabituationRegisterRaw
behaviour_class = getattr(btasks, 'HabituationTrials' + sync_label.capitalize())
compute_status = False
else:
registration_class = btasks.TrialRegisterRaw
behaviour_class = getattr(btasks, 'ChoiceWorldTrials' + sync_label.capitalize())
try:
behaviour_class = getattr(btasks, 'ChoiceWorldTrials' + sync_label.capitalize())
except AttributeError:
raise NotImplementedError(f'No trials task available for sync namespace "{sync_label}"')
compute_status = True
tasks[f'RegisterRaw_{protocol}_{i:02}'] = type(f'RegisterRaw_{protocol}_{i:02}', (registration_class,), {})(
**kwargs, **task_kwargs)
Expand Down

0 comments on commit a62554b

Please sign in to comment.