From b33a02dc5349578a1301e1375a8d5812a23367bd Mon Sep 17 00:00:00 2001 From: Roberto <37729096+RobertoDF@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:17:57 +0200 Subject: [PATCH 1/2] proc arg needs a dict --- docs/notebooks/process_svd.ipynb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/notebooks/process_svd.ipynb b/docs/notebooks/process_svd.ipynb index d67ec14..5ee2b37 100644 --- a/docs/notebooks/process_svd.ipynb +++ b/docs/notebooks/process_svd.ipynb @@ -90,7 +90,8 @@ "outputs": [], "source": [ "from facemap import process\n", - "from glob import glob" + "from glob import glob\n" + "import numpy as np" ] }, { @@ -190,9 +191,11 @@ "session_folders = [‘location1’, ‘location2’, …, ’locationN’]\n", "for indexSession, folder in enumerate(session_folders):\n", " video_files = glob(folder+\"/*.ext\") # replace .ext with one of ['*.mj2','*.mp4','*.mkv','*.avi','*.mpeg','*.mpg','*.asf']\n", + " proc = np.load("/path_to_saved_rois\, allow_pickle=True).item()\n" + " proc["savepath"] = None #savepath fields needs to be present\n" " process.run(video_files)\n", " # if SVDs of ROIs is required, use 'save ROIs' from GUI and use the following command\n", - " process.run(video_files, proc=\"/path_to_saved_rois\")" + " process.run(video_files, proc=proc)" ] } ], From 4b185ec15e27e8ea88d267ee1d76c7c8c268a053 Mon Sep 17 00:00:00 2001 From: Roberto <37729096+RobertoDF@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:22:29 +0200 Subject: [PATCH 2/2] proc arg needs be a dict --- docs/notebooks/process_svd.ipynb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/notebooks/process_svd.ipynb b/docs/notebooks/process_svd.ipynb index d67ec14..a624ea5 100644 --- a/docs/notebooks/process_svd.ipynb +++ b/docs/notebooks/process_svd.ipynb @@ -90,7 +90,8 @@ "outputs": [], "source": [ "from facemap import process\n", - "from glob import glob" + "from glob import glob\n", + "import numpy as np" ] }, { @@ -192,13 +193,15 @@ " video_files = glob(folder+\"/*.ext\") # replace .ext with one of ['*.mj2','*.mp4','*.mkv','*.avi','*.mpeg','*.mpg','*.asf']\n", " process.run(video_files)\n", " # if SVDs of ROIs is required, use 'save ROIs' from GUI and use the following command\n", - " process.run(video_files, proc=\"/path_to_saved_rois\")" + " proc = np.load(\"/path_to_saved_rois\").item()\n", + " proc[\"savepath\"] = None\n", + " process.run(video_files, proc=proc)" ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -212,7 +215,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.12.9" } }, "nbformat": 4,