From 3245d4625208e9728156cb2d88110dbbc5943f70 Mon Sep 17 00:00:00 2001 From: Nicholas Watters Date: Tue, 19 Dec 2023 11:51:21 -0500 Subject: [PATCH] Filename updates to make dandi uploading work. --- src/jazayeri_lab_to_nwb/watters/get_session_paths.py | 2 +- .../watters/main_convert_session.py | 10 +++++++--- src/jazayeri_lab_to_nwb/watters/nwb_converter.py | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/jazayeri_lab_to_nwb/watters/get_session_paths.py b/src/jazayeri_lab_to_nwb/watters/get_session_paths.py index 6aaf9c4..7530364 100644 --- a/src/jazayeri_lab_to_nwb/watters/get_session_paths.py +++ b/src/jazayeri_lab_to_nwb/watters/get_session_paths.py @@ -26,7 +26,7 @@ def _get_session_paths_openmind(subject, session): subject_id = SUBJECT_NAME_TO_ID[subject] # Path to write output nwb files to - output_path = f"/om/user/nwatters/nwb_data_multi_prediction" + output_path = f"/om/user/nwatters/nwb_data_multi_prediction/staging/sub-{subject}" # Path to the raw data. This is used for reading raw physiology data. raw_data_path = f"/om4/group/jazlab/nwatters/multi_prediction/phys_data/{subject}/" f"{session}/raw_data" diff --git a/src/jazayeri_lab_to_nwb/watters/main_convert_session.py b/src/jazayeri_lab_to_nwb/watters/main_convert_session.py index b68ef18..1640828 100644 --- a/src/jazayeri_lab_to_nwb/watters/main_convert_session.py +++ b/src/jazayeri_lab_to_nwb/watters/main_convert_session.py @@ -38,7 +38,7 @@ from neuroconv.utils import dict_deep_update, load_dict_from_file # Data repository. Either 'globus' or 'openmind' -_REPO = "globus" +_REPO = "openmind" # Whether to run all the physiology data or only a stub _STUB_TEST = True # Whether to overwrite output nwb files @@ -199,8 +199,12 @@ def session_to_nwb( session_id = f"{session}-stub" else: session_id = f"{session}" - raw_nwb_path = session_paths.output / f"{subject}_{session_id}_raw.nwb" - processed_nwb_path = session_paths.output / f"{subject}_{session_id}_processed.nwb" + raw_nwb_path = ( + session_paths.output / f"sub-{subject}_ses-{session_id}_ecephys.nwb" + ) + processed_nwb_path = ( + session_paths.output / f"sub-{subject}_ses-{session_id}_behavior+ecephys.nwb" + ) logging.info(f"raw_nwb_path = {raw_nwb_path}") logging.info(f"processed_nwb_path = {processed_nwb_path}") logging.info("") diff --git a/src/jazayeri_lab_to_nwb/watters/nwb_converter.py b/src/jazayeri_lab_to_nwb/watters/nwb_converter.py index 45a1aca..1a27435 100644 --- a/src/jazayeri_lab_to_nwb/watters/nwb_converter.py +++ b/src/jazayeri_lab_to_nwb/watters/nwb_converter.py @@ -17,15 +17,15 @@ from spikeinterface.core.waveform_tools import has_exceeding_spikes from spikeinterface.curation import remove_excess_spikes -from .display_interface import DisplayInterface -from .recording_interface import DatRecordingInterface -from .timeseries_interface import ( +from display_interface import DisplayInterface +from recording_interface import DatRecordingInterface +from timeseries_interface import ( AudioInterface, EyePositionInterface, PupilSizeInterface, RewardLineInterface, ) -from .trials_interface import TrialsInterface +from trials_interface import TrialsInterface class NWBConverter(NWBConverter):