diff --git a/tests/metadata.yaml b/tests/metadata.yaml deleted file mode 100644 index 17b14ba..0000000 --- a/tests/metadata.yaml +++ /dev/null @@ -1,16 +0,0 @@ -impedance_file_path: "tests/test_data/processed_ephys/impedance.csv" -channel_geometry_file_path: "tests/test_data/processed_ephys/geom.csv" -openephys_folder_path: "tests/test_data/raw_ephys/2022-07-25_15-30-00" -mountain_sort_output_file_path: "tests/test_data/processed_ephys/firings.mda" -sampling_frequency: 30000 - -# TODO: confirm that all electrodes are in the same group and in the same location -electrodes_location: "Nucleus Accumbens core" - -reference_skull_screw_location: Medial cerebellum - -# For now, there is just one device, which is the probe -device: - name: "Probe" - description: "Berke Lab Probe" - manufacturer: "My Manufacturer" diff --git a/tests/test_convert_raw_ephys.py b/tests/test_convert_raw_ephys.py index b14faa4..f71a98f 100644 --- a/tests/test_convert_raw_ephys.py +++ b/tests/test_convert_raw_ephys.py @@ -16,10 +16,11 @@ def test_add_electrode_data(): """ # Create a test metadata dictionary metadata = {} - metadata["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv" - metadata["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv" - metadata["electrodes_location"] = "Nucleus Accumbens core" - metadata["device"] = { + metadata["ephys"] = {} + metadata["ephys"]["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv" + metadata["ephys"]["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv" + metadata["ephys"]["electrodes_location"] = "Nucleus Accumbens core" + metadata["ephys"]["device"] = { "name": "Probe", "description": "Berke Lab Probe", "manufacturer": "My Manufacturer", @@ -51,7 +52,7 @@ def test_add_electrode_data(): eg = nwbfile.electrode_groups["ElectrodeGroup"] assert eg is not None assert eg.description == "All electrodes" - assert eg.location == metadata["electrodes_location"] + assert eg.location == metadata["ephys"]["electrodes_location"] assert eg.device is device # Test that the nwbfile has the expected electrodes after filtering @@ -111,11 +112,12 @@ def test_add_raw_ephys(): ) metadata = {} - metadata["openephys_folder_path"] = "tests/test_data/raw_ephys/2022-07-25_15-30-00" - metadata["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv" - metadata["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv" - metadata["electrodes_location"] = "Nucleus Accumbens core" - metadata["device"] = { + metadata["ephys"] = {} + metadata["ephys"]["openephys_folder_path"] = "tests/test_data/raw_ephys/2022-07-25_15-30-00" + metadata["ephys"]["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv" + metadata["ephys"]["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv" + metadata["ephys"]["electrodes_location"] = "Nucleus Accumbens core" + metadata["ephys"]["device"] = { "name": "Probe", "description": "Berke Lab Probe", "manufacturer": "My Manufacturer", diff --git a/tests/test_convert_spikes.py b/tests/test_convert_spikes.py index 13f7830..7726312 100644 --- a/tests/test_convert_spikes.py +++ b/tests/test_convert_spikes.py @@ -13,8 +13,9 @@ def test_add_spikes(): `python tests/test_data/create_spike_test_data.py`. """ metadata = {} - metadata["mountain_sort_output_file_path"] = "tests/test_data/processed_ephys/firings.mda" - metadata["sampling_frequency"] = 30_000 + metadata["ephys"] = {} + metadata["ephys"]["mountain_sort_output_file_path"] = "tests/test_data/processed_ephys/firings.mda" + metadata["ephys"]["sampling_frequency"] = 30_000 nwbfile = NWBFile( session_description="Mock session",