Skip to content

Commit

Permalink
VideoMaker trodes fixes and resume from fail (#1174)
Browse files Browse the repository at this point in the history
* Additional 'start from fail' measures

* WIP: fix TrodesPosVideo

* WIP: get n_frames on trodes vid

* WIP: error on upscaled data

* ✅ : Add missing index

* blackify

* More test fixes for headless VideoMaker

* pre-commit lint

* revert matplotlib backend
  • Loading branch information
CBroz1 authored Nov 7, 2024
1 parent dc08c25 commit 0c5a903
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 115 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ dj.FreeTable(dj.conn(), "common_session.session_group").drop()
- Minor fix to `DLCCentroid` make function order #1112, #1148
- Video creator tools:
- Pass output path as string to `cv2.VideoWriter` #1150
- Set `DLCPosVideo` default processor to `matplotlib`, remove support
for `open-cv` #1168
- `VideoMaker` class to process frames in multithreaded batches #1168
- Set `DLCPosVideo` default processor to `matplotlib`, remove support for
`open-cv` #1168
- `VideoMaker` class to process frames in multithreaded batches #1168, #1174
- `TrodesPosVideo` updates for `matplotlib` processor #1174

- Spike Sorting

Expand Down
2 changes: 1 addition & 1 deletion dj_local_conf_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
},
"kachery_zone": "franklab.default"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
"for sorting_id in sorting_ids:\n",
" try:\n",
" sgs.CurationV1.insert_curation(sorting_id=sorting_id)\n",
" except KeyError as e:\n",
" except KeyError:\n",
" pass\n",
"\n",
"SpikeSortingOutput.insert(\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
for sorting_id in sorting_ids:
try:
sgs.CurationV1.insert_curation(sorting_id=sorting_id)
except KeyError as e:
except KeyError:
pass

SpikeSortingOutput.insert(
Expand Down
4 changes: 3 additions & 1 deletion src/spyglass/position/v1/dlc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ def find_mp4(
.rsplit(video_filepath.parent.as_posix(), maxsplit=1)[-1]
.split("/")[-1]
)
return _convert_mp4(video_file, video_path, output_path, videotype="mp4")
return _convert_mp4(
video_file, video_path, output_path, videotype="mp4", count_frames=True
)


def _convert_mp4(
Expand Down
Loading

0 comments on commit 0c5a903

Please sign in to comment.