Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dj.FreeTable(dj.conn(), "common_session.session_group").drop()

- Fix video directory bug in `DLCPoseEstimationSelection` #1103
- Restore #973, allow DLC without position tracking #1100
- Minor fix to `DLCCentroid` make function order #1112

- Spike Sorting

Expand Down
13 changes: 7 additions & 6 deletions src/spyglass/position/v1/position_dlc_centroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ def _logged_make(self, key):
# Add to Analysis NWB file
analysis_file_name = AnalysisNwbfile().create(key["nwb_file_name"])
nwb_analysis_file = AnalysisNwbfile()
key["dlc_position_object_id"] = nwb_analysis_file.add_nwb_object(
nwb_analysis_file.add_nwb_object(analysis_file_name, position)
)
key["dlc_velocity_object_id"] = nwb_analysis_file.add_nwb_object(
nwb_analysis_file.add_nwb_object(analysis_file_name, velocity)
)

nwb_analysis_file.add(
nwb_file_name=key["nwb_file_name"],
analysis_file_name=analysis_file_name,
Expand All @@ -304,12 +311,6 @@ def _logged_make(self, key):
{
**key,
"analysis_file_name": analysis_file_name,
"dlc_position_object_id": nwb_analysis_file.add_nwb_object(
analysis_file_name, position
),
"dlc_velocity_object_id": nwb_analysis_file.add_nwb_object(
analysis_file_name, velocity
),
}
)

Expand Down