Skip to content

Commit 487cbbd

Browse files
authored
Merge pull request #122 from rjlopez2:main
updtae brnach from main
2 parents c164d29 + c4fd4a2 commit 487cbbd

File tree

6 files changed

+101
-10
lines changed

6 files changed

+101
-10
lines changed

docs/_static/butter_filter.gif

5.62 MB
Loading
9.31 MB
Loading

docs/_static/gaussian_filter.gif

8.62 MB
Loading
6.9 MB
Loading
22 MB
Loading

docs/tutorials/filter.ipynb

Lines changed: 101 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,122 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"```{currentmodule} optimap\n",
8-
"```"
7+
"# Filters \n",
8+
"\n",
9+
"in this tutorial:\n",
10+
"- [ ] invert and normalize signal\n",
11+
"- [ ] using temporal filter(s)\n",
12+
"- [ ] using spatial filter(s)\n"
913
]
1014
},
1115
{
1216
"cell_type": "markdown",
1317
"metadata": {},
1418
"source": [
15-
"```{tip}\n",
16-
"Download this tutorial as a {download}`Jupyter notebook <converted/filter.ipynb>`, or as a {download}`python script <converted/filter.py>` with code cells. We highly recommend using [Visual Studio Code](https://code.visualstudio.com/) to execute this tutorial. Alternatively, you could run the Python script in a terminal with ``python filter.py`` from the folder where the file is located.\n",
17-
"```"
19+
"Before we proceed to use the different filters to process and imporve the signal quality of the traces, let's first try to pree-process this example image by inverting and normalizing the signal."
1820
]
1921
},
2022
{
2123
"cell_type": "markdown",
2224
"metadata": {},
2325
"source": [
24-
"# Filters \n",
26+
"## Invert and normalize"
27+
]
28+
},
29+
{
30+
"cell_type": "markdown",
31+
"metadata": {},
32+
"source": [
33+
"![plot viewer](/_static/invert_normalize_1.gif)"
34+
]
35+
},
36+
{
37+
"cell_type": "markdown",
38+
"metadata": {},
39+
"source": [
40+
"Note that there are three different normalization options:\n",
2541
"\n",
26-
"{{under_construction_warn}}\n",
42+
" 1. Local Max: perform pixel wise normalization.\n",
2743
"\n",
28-
"todo list:\n",
29-
"- using temporal filter(s)\n",
30-
"- using spatial filter(s)\n"
44+
" 2. Slide window: same as local max but max is defined by a defined slide window.\n",
45+
"\n",
46+
" 1. Global: uses the averaged maximum value for normalization.\n",
47+
"\n",
48+
"In the previous example, we use the default normalization method (Local max)"
49+
]
50+
},
51+
{
52+
"cell_type": "markdown",
53+
"metadata": {},
54+
"source": [
55+
"Let's playback the whole sequence to visualize the AP propagation after normalization of the signal. "
56+
]
57+
},
58+
{
59+
"cell_type": "markdown",
60+
"metadata": {},
61+
"source": [
62+
"![plot viewer](/_static/playback_normalized_signal.gif)"
63+
]
64+
},
65+
{
66+
"cell_type": "markdown",
67+
"metadata": {},
68+
"source": [
69+
"## Spatial filters\n"
3170
]
71+
},
72+
{
73+
"cell_type": "markdown",
74+
"metadata": {},
75+
"source": [
76+
"The foldable filter tab will display a number of filter that we can use. The filter operations are typically costly for large images, however, if you have a GPU available you can benefit of optimized accelerated version of these filters."
77+
]
78+
},
79+
{
80+
"cell_type": "markdown",
81+
"metadata": {},
82+
"source": [
83+
"![plot viewer](/_static/gaussian_filter.gif)"
84+
]
85+
},
86+
{
87+
"cell_type": "markdown",
88+
"metadata": {},
89+
"source": [
90+
"## Temporal filters\n"
91+
]
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"metadata": {},
96+
"source": [
97+
"![plot viewer](/_static/butter_filter.gif)"
98+
]
99+
},
100+
{
101+
"cell_type": "markdown",
102+
"metadata": {},
103+
"source": []
104+
},
105+
{
106+
"cell_type": "markdown",
107+
"metadata": {},
108+
"source": [
109+
"To better visualize the effect of the filter, specially the temporal filter, let's compare the profiles of the different resulting images after applying the spatial and temporal filters."
110+
]
111+
},
112+
{
113+
"cell_type": "markdown",
114+
"metadata": {},
115+
"source": [
116+
"![plot viewer](/_static/compare_filter_profiles.gif)"
117+
]
118+
},
119+
{
120+
"cell_type": "markdown",
121+
"metadata": {},
122+
"source": []
32123
}
33124
],
34125
"metadata": {

0 commit comments

Comments
 (0)