Skip to content

Commit

Permalink
PREGENERATED_SESSION_NUM -> SESSION_TEMPLATE_ID in ephys passive extr…
Browse files Browse the repository at this point in the history
…action
  • Loading branch information
k1o0 committed Mar 6, 2025
1 parent 6e2c603 commit 5aee1eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ibllib/io/extractors/ephys_passive.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def _load_passive_session_fixtures(session_path: str, task_collection: str = 'ra
:rtype: dict
"""

# THIS CAN BE PREGENERATED SESSION NO
# The pregenerated session number has had many parameter names
settings = rawio.load_settings(session_path, task_collection=task_collection)
ses_nb = settings['PREGENERATED_SESSION_NUM']
pars = map(settings.get, ['PRELOADED_SESSION_NUM', 'PREGENERATED_SESSION_NUM', 'SESSION_TEMPLATE_ID'])
ses_nb = next((k for k in pars if k is not None), None)

session_order = settings.get('SESSION_ORDER', None)
if session_order: # TODO test this out and make sure it okay
assert settings["SESSION_ORDER"][settings["SESSION_IDX"]] == ses_nb
Expand Down

0 comments on commit 5aee1eb

Please sign in to comment.