|
112 | 112 | "\n",
|
113 | 113 | "The following file formats are currently supported by ``optimap``:\n",
|
114 | 114 | "\n",
|
115 |
| - "* .tif, .tiff (TIFF stack or folder with a series of individual TIFFs)\n", |
116 |
| - "* .png (folder with a series of PNGs)\n", |
| 115 | + "* .tif, .tiff (TIFF) image stacks\n", |
| 116 | + "* Folder containing sequence of TIFF or .png (PNG) images\n", |
117 | 117 | "* .gsd, .gsh (SciMedia MiCAM 05)\n",
|
118 | 118 | "* .rsh, .rsm, .rsd (SciMedia MiCAM ULTIMA)\n",
|
119 | 119 | "* .dat (MultiRecorder)\n",
|
120 | 120 | "* .npy (numpy array)\n",
|
121 | 121 | "* .mat (MATLAB), loads the first field in the file\n",
|
122 | 122 | "\n",
|
123 |
| - "We can use the `optimap.load_video` function to load a video file, see also [Tutorial 13](io.ipynb). The code below will automatically download an example file from our website [cardiacvision.ucsf.edu](https://cardiacvision.ucsf.edu) and load it into our workspace as a video. Alternatively, you could load your own file by replacing `filepath` with the filename of your video which you have stored somewhere on your computer. After loading, the video corresponds to a three-dimensional `NumPy`-array where the first dimension is time and the other two dimensions are the x- and y-dimensions, respectively. The example file shows a fibrillating, weakly contracting rabbit heart stained with voltage-sensitive dye (Di-4-ANEPPS) imaged using a Basler acA720-520um camera at 500fps. Due to the staining, the action potential wave is inverted, i.e. an upstroke is observed as a negative deflection. The data is from {cite}`Chowdhary2023` and we extracted a short part of the original recording and saved the otherwise unprocessed raw video data as a numpy file (`.npy`). Experimenters: Jan Lebert, Shrey Chowdhary & Jan Christoph (University of California, San Francisco, USA), 2023." |
| 123 | + "We can use the {func}`optimap.load_video` function to load a video file, see also [Tutorial 13](io.ipynb). The code below will automatically download an example file from our website [cardiacvision.ucsf.edu](https://cardiacvision.ucsf.edu) and load it into our workspace as a video. Alternatively, you could load your own file by replacing `filepath` with the filename of your video which you have stored somewhere on your computer. The example file shows a fibrillating, weakly contracting rabbit heart stained with voltage-sensitive dye (Di-4-ANEPPS) imaged using a Basler acA720-520um camera at 500fps. Due to the staining, the action potential wave is inverted, i.e. an upstroke is observed as a negative deflection. The data is from {cite}`Chowdhary2023` and we extracted a short part of the original recording and saved the otherwise unprocessed raw video data as a numpy file (`.npy`). Experimenters: Jan Lebert, Shrey Chowdhary & Jan Christoph (University of California, San Francisco, USA), 2023." |
124 | 124 | ]
|
125 | 125 | },
|
126 | 126 | {
|
|
131 | 131 | "source": [
|
132 | 132 | "filepath = om.utils.retrieve_example_data('Example_02_VF_Rabbit_Di-4-ANEPPS_Basler_acA720-520um.npy')\n",
|
133 | 133 | "# alternative if you downloaded the file to your desktop\n",
|
134 |
| - "# filepath = '/Users/userxyz/Desktop/Example_02_VF_Rabbit_Di-4-ANEPPS_Basler_acA720-520um.npy'\n", |
| 134 | + "# filepath = 'Example_02_VF_Rabbit_Di-4-ANEPPS_Basler_acA720-520um.npy'\n", |
135 | 135 | "video = om.load_video(filepath)\n",
|
136 | 136 | "\n",
|
137 | 137 | "om.print_properties(video)"
|
|
141 | 141 | "cell_type": "markdown",
|
142 | 142 | "metadata": {},
|
143 | 143 | "source": [
|
144 |
| - "`optimap` imports video data as three-dimensional numpy arrays with shape (Time, Height, Width). This convention is used throughout the library. The function `optimap.print_properties()` displays the dimensions and maximal and minimal intensity values of a video. Our example file has 1040 video frames. See {func}`load_video` for additional arguments, e.g. to load only a subset of the frames or to use memory mapping to reduce memory usage.\n", |
| 144 | + "`optimap` imports video data as three-dimensional NumPy array, where the first dimension is time and the other two dimensions are the x- and y-dimensions, respectively. This convention is used throughout the library. The function `optimap.print_properties()` displays the dimensions and maximal and minimal intensity values of a video. Our example file has 1040 video frames. See {func}`load_video` for additional arguments, e.g. to load only a subset of the frames or to use memory mapping to reduce memory usage.\n", |
145 | 145 | "\n",
|
146 | 146 | "```python\n",
|
147 | 147 | "video = om.load_video('Example.dat', start_frame=100, frames=1000, step=2, use_mmap=True)\n",
|
|
0 commit comments