diff --git a/caiman/motion_correction.py b/caiman/motion_correction.py index 8795c6a59..f1cc9d46f 100644 --- a/caiman/motion_correction.py +++ b/caiman/motion_correction.py @@ -3076,9 +3076,6 @@ def tile_and_correct_wrapper(params): extension = extension.lower() shift_info = [] - print("In tile and correct wrapper about to call load with subidxs") - print(f"subidx type: {type(idxs)}") - imgs = cm.load(img_name, subindices=idxs, var_name_hdf5=var_name_hdf5,is3D=is3D) imgs = imgs[(slice(None),) + indices] mc = np.zeros(imgs.shape, dtype=np.float32) diff --git a/demos/notebooks/demo_online_cnmfE.ipynb b/demos/notebooks/demo_online_cnmfE.ipynb index 1be3aa475..139b7b0ef 100644 --- a/demos/notebooks/demo_online_cnmfE.ipynb +++ b/demos/notebooks/demo_online_cnmfE.ipynb @@ -28,6 +28,7 @@ "import logging\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", + "from time import time\n", "\n", "import caiman as cm\n", "from caiman.source_extraction import cnmf as cnmf\n", @@ -174,8 +175,7 @@ " cm.load(mc.mmap_file).resize(1, 1, temporal_downsampling)), axis=2).play(fr=30,\n", " magnification=1,\n", " gain=0.6,\n", - " plot_text=True,\n", - " do_loop=True)\n", + " plot_text=True)\n", "#plt.figure(); plt.plot(mc.shifts_rig); plt.legend(['x-shifts', 'y-shifts']) " ] }, @@ -202,7 +202,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Inspect correlation and PNR images to set relevant thresholds" + "### Inspect correlation and PNR images to set relevant thresholds\n", + "First, extract correlation and pnr images." ] }, { @@ -212,12 +213,9 @@ "outputs": [], "source": [ "gSig = (6, 6)\n", - "\n", "cn_filter, pnr = cm.summary_images.correlation_pnr(images[::max(T//1000, 1)], \n", " gSig=gSig[0], \n", - " swap_dim=False) # change swap dim if output looks weird, it is a problem with tiffile\n", - "\n", - "\n" + " swap_dim=False) # change swap dim if output looks weird, it is a problem with tiffile" ] }, { @@ -294,20 +292,11 @@ "metadata": {}, "outputs": [], "source": [ - "from time import time\n", "t1 = -time()\n", "cnm = cnmf.CNMF(n_processes=n_processes, dview=dview, params=opts)\n", "cnm.fit(images)\n", - "t1 += time()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(f\"Wall time: {t1: 0.2f} seconds\")" + "t1 += time()\n", + "print(f\"Elapsed time: {t1: 0.2f} seconds\")" ] }, {