diff --git a/src/aind_metadata_mapper/open_ephys/camstim_ephys_session.py b/src/aind_metadata_mapper/open_ephys/camstim_ephys_session.py index ee3860db..242d59ec 100644 --- a/src/aind_metadata_mapper/open_ephys/camstim_ephys_session.py +++ b/src/aind_metadata_mapper/open_ephys/camstim_ephys_session.py @@ -17,8 +17,7 @@ import pandas as pd from aind_data_schema.components.coordinates import Coordinates3d from aind_data_schema.core.session import ( - EphysModule, - EphysProbeConfig, + ManipulatorModule, Session, Stream, ) @@ -230,13 +229,12 @@ def ephys_modules(self) -> list: probe_name, newscale_coords ) - probe_module = EphysModule( + probe_module = ManipulatorModule( assembly_name=probe_name.upper(), arc_angle=0.0, module_angle=0.0, rotation_angle=0.0, primary_targeted_structure="none", - ephys_probes=[EphysProbeConfig(name=probe_name.upper())], manipulator_coordinates=manipulator_coordinates, notes=notes, ) diff --git a/src/aind_metadata_mapper/open_ephys/utils/stim_utils.py b/src/aind_metadata_mapper/open_ephys/utils/stim_utils.py index f8c696ba..1dccc19c 100644 --- a/src/aind_metadata_mapper/open_ephys/utils/stim_utils.py +++ b/src/aind_metadata_mapper/open_ephys/utils/stim_utils.py @@ -604,9 +604,10 @@ def read_stimulus_name_from_path(stimulus): stim_name = stimulus["stim_path"].split("\\")[-1].split(".")[0] - if len(stim_name) == 0: - stim_name = stimulus["stim_path"].split("\\\\")[-2] - + if stimulus["stim_path"] == "": + stim_name = stimulus["movie_local_path"].split("\\")[-1].split(".")[0] + else: + stim_name = stimulus["stim_path"].split("\\")[-1].split(".")[0] return stim_name diff --git a/tests/test_open_ephys/test_rig.py b/tests/test_open_ephys/test_rig.py index 99209f05..77332435 100644 --- a/tests/test_open_ephys/test_rig.py +++ b/tests/test_open_ephys/test_rig.py @@ -6,9 +6,9 @@ from unittest.mock import MagicMock, patch from aind_data_schema.core.rig import Rig # type: ignore - from aind_metadata_mapper.open_ephys.rig import OpenEphysRigEtl + RESOURCES_DIR = ( Path(os.path.dirname(os.path.realpath(__file__))) / ".." / "resources" )