Skip to content

Commit

Permalink
added video
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson committed Nov 6, 2024
1 parent 5e408af commit 8ed56b5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ classifiers = [
]

dependencies = [
"neuroconv",
"neuroconv[spikegadgets,video]",
"nwbinspector",
"pre-commit",
"ipykernel",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import shutil

from neuroconv.utils import load_dict_from_file, dict_deep_update
from neuroconv.datainterfaces import SpikeGadgetsRecordingInterface

from jadhav_lab_to_nwb.olson_2024 import Olson2024NWBConverter

Expand All @@ -29,6 +28,11 @@ def session_to_nwb(data_dir_path: str | Path, output_dir_path: str | Path, stub_
source_data.update(dict(Recording=dict(file_path=file_path)))
conversion_options.update(dict(Recording=dict(stub_test=stub_test)))

# Add Video
file_paths = [data_dir_path / f"{data_dir_path.name}.1.h264"]
source_data.update(dict(Video=dict(file_paths=file_paths)))
conversion_options.update(dict(Video=dict()))

converter = Olson2024NWBConverter(source_data=source_data)

# Add datetime to conversion
Expand Down
5 changes: 5 additions & 0 deletions src/jadhav_lab_to_nwb/olson_2024/olson_2024_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ Ecephys:
ElectricalSeries:
- name: ElectricalSeries
description: Raw acquisition of extracellular electrophysiology data recorded by SpikeGadgets.

Behavior:
Videos:
- name: Video SL18_D19_S01_F01_BOX_SLP_20230503_112642.1
description: Video of the rat in the box.
2 changes: 2 additions & 0 deletions src/jadhav_lab_to_nwb/olson_2024/olson_2024_nwbconverter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Primary NWBConverter class for this dataset."""
from neuroconv import NWBConverter
from neuroconv.datainterfaces import VideoInterface

from jadhav_lab_to_nwb.olson_2024 import Olson2024BehaviorInterface, Olson2024SpikeGadgetsRecordingInterface

Expand All @@ -9,4 +10,5 @@ class Olson2024NWBConverter(NWBConverter):

data_interface_classes = dict(
Recording=Olson2024SpikeGadgetsRecordingInterface,
Video=VideoInterface,
)

0 comments on commit 8ed56b5

Please sign in to comment.