Skip to content

Commit 2b5ed65

Browse files
committed
Fix recorders for non-ephys DR sessions
1 parent 4900f54 commit 2b5ed65

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

src/np_workflows/shared/base_experiments.py

+23-12
Original file line numberDiff line numberDiff line change
@@ -546,24 +546,35 @@ def task_name(self, task_name: str) -> None:
546546
print(f"{task_name = !r} doesn't correspond to a preset value, but the attribute is updated anyway!")
547547
else:
548548
print(f"Updated {self.__class__.__name__}.{task_name = !r}")
549-
550-
services = (
551-
np_services.Sync,
552-
np_services.VideoMVR,
553-
np_services.OpenEphys,
554-
np_services.NewScaleCoordinateRecorder,
555-
np_services.ScriptCamstim,
556-
np_services.MouseDirector,
557-
)
558549

559550
stims = (np_services.ScriptCamstim,)
560551

561552
@property
562553
def recorders(self) -> tuple[Service, ...]:
563554
"""Services to be started before stimuli run, and stopped after. Session-dependent."""
564-
if self.is_hab:
565-
return (np_services.Sync, np_services.VideoMVR)
566-
return (np_services.Sync, np_services.VideoMVR, np_services.OpenEphys)
555+
if self.is_ephys:
556+
return (np_services.Sync, np_services.VideoMVR, np_services.OpenEphys)
557+
return (np_services.Sync, np_services.VideoMVR)
558+
559+
@property
560+
def services(self) -> tuple[Service, ...]:
561+
"""All services"""
562+
if self.is_ephys:
563+
return (
564+
np_services.Sync,
565+
np_services.VideoMVR,
566+
np_services.OpenEphys,
567+
np_services.NewScaleCoordinateRecorder,
568+
np_services.ScriptCamstim,
569+
np_services.MouseDirector,
570+
)
571+
return (
572+
np_services.Sync,
573+
np_services.VideoMVR,
574+
np_services.ScriptCamstim,
575+
np_services.MouseDirector,
576+
)
577+
567578

568579
@property
569580
def hdf5_dir(self) -> pathlib.Path:

0 commit comments

Comments
 (0)