Skip to content

Commit

Permalink
photometry sync task
Browse files Browse the repository at this point in the history
  • Loading branch information
oliche committed Nov 11, 2024
1 parent f7aecdb commit ff23403
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 332 deletions.
269 changes: 0 additions & 269 deletions ibllib/io/extractors/fibrephotometry.py

This file was deleted.

16 changes: 7 additions & 9 deletions ibllib/pipes/dynamic_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import ibllib.pipes.video_tasks as vtasks
import ibllib.pipes.ephys_tasks as etasks
import ibllib.pipes.audio_tasks as atasks
import ibllib.pipes.photometry_tasks as ptasks
import ibllib.pipes.neurophotometrics as ptasks
# from ibllib.pipes.photometry_tasks import FibrePhotometryPreprocess, FibrePhotometryRegisterRaw

_logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -582,14 +582,12 @@ def make_pipeline(session_path, **pkwargs):
tasks['MesoscopeCompress'] = type('MesoscopeCompress', (mscope_tasks.MesoscopeCompress,), {})(
**kwargs, **mscope_kwargs, parents=[tasks['MesoscopePreprocess']])

if 'photometry' in devices:
# {'collection': 'raw_photometry_data', 'sync_label': 'frame_trigger', 'regions': ['Region1G', 'Region3G']}
photometry_kwargs = devices['photometry']
tasks['FibrePhotometryRegisterRaw'] = type('FibrePhotometryRegisterRaw', (
ptasks.FibrePhotometryRegisterRaw,), {})(**kwargs, **photometry_kwargs)
tasks['FibrePhotometryPreprocess'] = type('FibrePhotometryPreprocess', (
ptasks.FibrePhotometryPreprocess,), {})(**kwargs, **photometry_kwargs, **sync_kwargs,
parents=[tasks['FibrePhotometryRegisterRaw']] + sync_tasks)
if 'neurophotometrics' in devices:
# {'collection': 'raw_photometry_data', 'datetime': '2024-09-18T16:43:55.207000',
# 'fibers': {'G0': {'location': 'NBM'}, 'G1': {'location': 'SI'}}, 'sync_channel': 1}
photometry_kwargs = devices['neurophotometrics']
tasks['FibrePhotometrySync'] = type('FibrePhotometrySync', (
ptasks.FibrePhotometrySync,), {})(**kwargs, **photometry_kwargs)

p = mtasks.Pipeline(session_path=session_path, **pkwargs)
p.tasks = tasks
Expand Down
Loading

0 comments on commit ff23403

Please sign in to comment.