{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "
\n", " \n", "
\n", "\n", "### Prof. Dr. -Ing. Gerald Schuller
Jupyter Notebook: Renato Profeta\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "# Complex Signals and Filters, Hilbert Transform" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "Imagine we would like to know the precise, **instantaneous, amplitude of a sinusoid**. \n", "\n", "Just looking at the function this might not be so easy, we would have to determine the maximum or minimum, and depending on the sinusoidal frequency this might take some time, during which the amplitude also might have changed. But if we have a **complex exponential** with samples\n", "\n", "$$\\large\n", "x(n)=A \\cdot e^{j \\Omega n}= A \\cdot cos(\\Omega n)+ j A \\cdot sin(\\Omega n)\n", "$$\n", "(we know x(n) but not A)\n", "\n", "We can easily determine the amplitude A only knowing one complex valued sample x(n) by taking the magnitude of this complex exponential,\n", " \n", "$$\\large\n", "A= \\sqrt{\\Re(x(n))^2+\\Im(x(n))^2}=\n", "$$\n", " \n", "$$\\large\n", "=\\sqrt{((A \\cdot cos(\\Omega n))^2 + (A \\cdot sin(\\Omega n))^2)\n", "}$$\n", "\n", "Observe that this computation of A is independent of the time index n, so it can be done at **every time instance**.\n", "\n", "So if we not only have the sine or cosine function in itself, but both, we can easily compute the instantaneous amplitude in this way. This means, instead of just having the sinusoidal function, we also have the **90 degrees phase shifted** version of it, to compute the amplitude. The problem is, if we only have one part (e.g. the real part) how do we get this 90 degrees phase shifted version?\n", "\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For example, look at the sine function. It already consists of 2 complex exponentials,\n", "\n", "$$\\large\n", "sin(\\Omega n)=\\frac{1} {2j} (e^{j\\Omega n} - e^{-j\\Omega n})\n", "$$\n", "\n", "we just have one exponential too many. If we look at it in the Fourier Domain, we see that one exponential is at positive frequencies, and the other is at negative frequencies. If we could remove one of the 2 exponentials, for instance at the negative frequencies, we would have reached our goal of obtaining a complex exponential for amplitude computations. So what we need is a filter, which **attenuates the negative frequencies**, and leaves the **positive frequencies unchanged**!\n", "\n", "So how do we obtain such a filter? First we formulate our requirement in the **frequency domain** (the DTFT domain):\n", "\n", "\n", "$$\\large\n", "H(\\Omega)=\\left \\lbrace \\substack { 1 \\textrm{ for } \\Omega > 0 \\\\ 0 \\textrm{ for } \\Omega <0 } \\right \\rbrace\n", "$$" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "We could multiply our signal spectrum with this frequency domain formulation (which is often not practical), or in the time domain convolve with the **impulse response** of the resulting filter obtained with **inverse DTFT**,\n", "\n", "$$\\large\n", "h(n)=\\frac{1}{2\\pi}\\int_{0}^{\\pi}1\\cdot e^{j\\Omega n}d\\Omega =\n", "$$\n", "\n", "for $n\\neq 0$ this becomes\n", "\n", "$$\\large\n", "=\\frac{1}{2\\pi}\\left(\\frac{1}{jn}\\cdot e^{j\\pi n} -\\frac{1}{jn}\\right)=\n", "$$\n", "\n", "$$\\large\n", "=\\frac{1 } {2 \\pi} \\left( \\frac{-j} {n} \\cdot (-1)^n + \\frac{j} {n} \\right)=\n", "$$\n", "\n", "$$\\large\n", "=\\left \\lbrace \\substack{\\frac{j} {\\pi n}\\textrm{ for n odd }\\\\ \n", "0\\textrm{ for n even} } \\right \\rbrace \n", "$$\n", "\n", "For n=0 this inverse DTFT integral becomes \n", "\n", "$$\\large\n", "h(0)=\\frac{1}{2\\pi}\\cdot \\pi=\\frac{1}{2}\n", "$$\n", "\n", "\n", "Hence the resulting impulse response of this one-sided filter becomes\n", "\n", "$$\\large\n", "h(n) = \\frac{1} {2} \\cdot \\delta(n) + \\left \\lbrace \\substack{\\frac{j} {\\pi n} \\textrm{for n odd} \\\\ 0 \\textrm{ for n even } } \\right \\rbrace\n", "$$\n", "\n", "This is now the **resulting impulse response** (time domain) of our **filter which passes all the positive frequencies and attenuates the negative frequencies**. \n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here we can see that the first part with the **delta function** represents the **real part**, which is the signal itself (signal convolved with the delta impulse), except for a factor of 2. The second part represents the imaginary part of our one-sided signal (pos. frequencies). Multiplying both parts with this factor of 2 for simplicity, we obtain the following structure,\n", "
\n", " \n", "
\n", "\n", "\n", "where the **Hilbert Transformer** \n", "$h_H(n)$ is\n", "\n", "$$\\large\n", "h_H(n)=\\left \\lbrace \\substack{ \\frac{2} {\\pi n} \\textrm{ for n odd } \\\\ \\textrm{ 0 for n even }} \\right \\rbrace\n", "$$\n", "\n", "(See also: Oppenheim, Schafer, “Discrete-Time Signal Processing”). The x(n) is our real valued signal. Observe that only this part, which creates the imaginary signal part, is the Hilbert Transformer. We can use it to construct a filter that suppresses the negative frequencies.\n", "\n", "This means, we take our **original signal** (the sinusoid) and **define it as our real part**. Then we take the **Hilbert filtered signal**, filtered with the above $h_H(n)$, and define it as our **imaginary part**. Then both together have a **one-sided, positive only spectrum**! That also means, our Hilbert transform filter is our **90 degrees phase shifter** that we where looking for!\n", "\n", "You can also imagine, if the real part is a $cos$ signal, then the Hilbert Transformer generates the $j\\cdot sin$ part." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "#### **Python example**: Plot the Hilbert transformer for n= -10 ..10:\n" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support. ' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
');\n", " var titletext = $(\n", " '
');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
');\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('');\n", " button.click(method_name, toolbar_event);\n", " button.mouseover(tooltip, toolbar_mouse_event);\n", " nav_element.append(button);\n", " }\n", "\n", " // Add the status bar.\n", " var status_bar = $('');\n", " nav_element.append(status_bar);\n", " this.message = status_bar[0];\n", "\n", " // Add the close button to the window.\n", " var buttongrp = $('
');\n", " var button = $('');\n", " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", " buttongrp.append(button);\n", " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", " titlebar.prepend(buttongrp);\n", "}\n", "\n", "mpl.figure.prototype._root_extra_style = function(el){\n", " var fig = this\n", " el.on(\"remove\", function(){\n", "\tfig.close_ws(fig, {});\n", " });\n", "}\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(el){\n", " // this is important to make the div 'focusable\n", " el.attr('tabindex', 0)\n", " // reach out to IPython and tell the keyboard manager to turn it's self\n", " // off when our div gets focus\n", "\n", " // location in version 3\n", " if (IPython.notebook.keyboard_manager) {\n", " IPython.notebook.keyboard_manager.register_events(el);\n", " }\n", " else {\n", " // location in version 2\n", " IPython.keyboard_manager.register_events(el);\n", " }\n", "\n", "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", " var manager = IPython.notebook.keyboard_manager;\n", " if (!manager)\n", " manager = IPython.keyboard_manager;\n", "\n", " // Check for shift+enter\n", " if (event.shiftKey && event.which == 13) {\n", " this.canvas_div.blur();\n", " // select the cell after this one\n", " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", " IPython.notebook.select(index + 1);\n", " }\n", "}\n", "\n", "mpl.figure.prototype.handle_save = function(fig, msg) {\n", " fig.ondownload(fig, null);\n", "}\n", "\n", "\n", "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", " // IPython event is triggered only after the cells have been serialised, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", " data = data.data;\n", " }\n", " if (data['text/html'] == html_output) {\n", " return [cell, data, j];\n", " }\n", " }\n", " }\n", " }\n", "}\n", "\n", "// Register the function which deals with the matplotlib target/channel.\n", "// The kernel may be null if the page has been refreshed.\n", "if (IPython.notebook.kernel != null) {\n", " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", "}\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Frequency Response\n", "\n", "from scipy.signal import freqz\n", "import numpy as np\n", "from matplotlib.ticker import FuncFormatter, MultipleLocator\n", "\n", "w, h_response = freqz(h)\n", "\n", "fig=plt.figure(figsize=(8,6))\n", "fig.suptitle('Frequency Response', fontsize=16)\n", "plt.subplot(2,1,1)\n", "plt.plot(w/np.pi, 20 * np.log10(abs(h_response), where=abs(h_response) > 0), 'b')\n", "#plt.ylim((-0.001,0.001))\n", "plt.ylabel('Amplitude (dB)')\n", "plt.xlabel('Normalized Frequency')\n", "plt.grid()\n", "ax = plt.gca()\n", "ax.xaxis.set_major_formatter(FuncFormatter(\n", " lambda val,pos: '{:.0g}$\\pi$'.format(val) if val !=0 else '0'\n", "))\n", "ax.xaxis.set_major_locator(MultipleLocator(base=0.2))\n", "plt.subplot(2,1,2)\n", "angles = np.angle(h_response)\n", "plt.plot(w/np.pi, angles, 'g')\n", "plt.ylabel('Angle (radians)')\n", "plt.xlabel('Normalized Frequency')\n", "ax = plt.gca()\n", "ax.xaxis.set_major_formatter(FuncFormatter(\n", " lambda val,pos: '{:.0g}$\\pi$'.format(val) if val !=0 else '0'\n", "))\n", "ax.xaxis.set_major_locator(MultipleLocator(base=0.2))\n", "plt.grid()\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "Here we can see that the phase curve indeed would hit the $\\dfrac{pi}{2}$ Rad (90 degree) mark at the phase axis. We see that the magnitude plot only reaches about 0 dB attenuation at about frequency $0.08\\cdot \\pi$ and reaches higher attenuations at frequencies below about $0.05\\cdot \\pi$ and above about $0.95\\cdot \\pi$. Hence it is only a working Hilbert transformer within this frequency range.\n", "\n", "If we want to plot the frequency response of our **entire filter** (not just the Hilbert transformer part), which **passes only the positive frequencies**, we first need to construct our resulting complex filter, and then plot the frequency response on the **whole** frequency circle. First we need to create the correspondingly delayed unit impulse as the real part:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [ { "data": { "text/plain": [ "array([0.-0.07073553j, 0.+0.j , 0.-0.09094568j, 0.+0.j ,\n", " 0.-0.12732395j, 0.+0.j , 0.-0.21220659j, 0.+0.j ,\n", " 0.-0.63661977j, 1.+0.j , 0.+0.63661977j, 0.+0.j ,\n", " 0.+0.21220659j, 0.+0.j , 0.+0.12732395j, 0.+0.j ,\n", " 0.+0.09094568j, 0.+0.j , 0.+0.07073553j, 0.+0.j ])" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# construct a delayed impulse to implement the \n", "# delay for the real part:\n", "delt = np.zeros(20)\n", "delt[9] = 1\n", "#delt =\n", "#0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0\n", "#Then we need to add our imaginary part as our \n", "#Hilbert transform to obtain our complex filter:\n", "h = np.zeros(20);\n", "n = np.arange(-9, 10+1, 2);\n", "h[(n-1)+10] = 2./(np.pi*n);\n", "hone = delt+h*1j\n", "\n", "hone\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "Observe that this is our first complex valued filter!\n", "\n", "Its frequency response, including negative frequencies above $\\pi$, is:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support. ' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
');\n", " var titletext = $(\n", " '
');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
');\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('');\n", " button.click(method_name, toolbar_event);\n", " button.mouseover(tooltip, toolbar_mouse_event);\n", " nav_element.append(button);\n", " }\n", "\n", " // Add the status bar.\n", " var status_bar = $('');\n", " nav_element.append(status_bar);\n", " this.message = status_bar[0];\n", "\n", " // Add the close button to the window.\n", " var buttongrp = $('
');\n", " var button = $('');\n", " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", " buttongrp.append(button);\n", " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", " titlebar.prepend(buttongrp);\n", "}\n", "\n", "mpl.figure.prototype._root_extra_style = function(el){\n", " var fig = this\n", " el.on(\"remove\", function(){\n", "\tfig.close_ws(fig, {});\n", " });\n", "}\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(el){\n", " // this is important to make the div 'focusable\n", " el.attr('tabindex', 0)\n", " // reach out to IPython and tell the keyboard manager to turn it's self\n", " // off when our div gets focus\n", "\n", " // location in version 3\n", " if (IPython.notebook.keyboard_manager) {\n", " IPython.notebook.keyboard_manager.register_events(el);\n", " }\n", " else {\n", " // location in version 2\n", " IPython.keyboard_manager.register_events(el);\n", " }\n", "\n", "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", " var manager = IPython.notebook.keyboard_manager;\n", " if (!manager)\n", " manager = IPython.keyboard_manager;\n", "\n", " // Check for shift+enter\n", " if (event.shiftKey && event.which == 13) {\n", " this.canvas_div.blur();\n", " // select the cell after this one\n", " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", " IPython.notebook.select(index + 1);\n", " }\n", "}\n", "\n", "mpl.figure.prototype.handle_save = function(fig, msg) {\n", " fig.ondownload(fig, null);\n", "}\n", "\n", "\n", "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", " // IPython event is triggered only after the cells have been serialised, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", " data = data.data;\n", " }\n", " if (data['text/html'] == html_output) {\n", " return [cell, data, j];\n", " }\n", " }\n", " }\n", " }\n", "}\n", "\n", "// Register the function which deals with the matplotlib target/channel.\n", "// The kernel may be null if the page has been refreshed.\n", "if (IPython.notebook.kernel != null) {\n", " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", "}\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import scipy.signal as sp\n", "b=sp.remez(21, [0.03, 0.47],[1], type='hilbert');\n", "\n", "\n", "# Frequency Response\n", "\n", "from scipy.signal import freqz\n", "import numpy as np\n", "from matplotlib.ticker import FuncFormatter, MultipleLocator\n", "\n", "w, h_response = freqz(b, whole=False)\n", "\n", "fig=plt.figure(figsize=(8,6))\n", "fig.suptitle('Frequency Response', fontsize=16)\n", "plt.subplot(2,1,1)\n", "plt.plot(w/np.pi, 20 * np.log10(abs(h_response), where=abs(h_response) > 0), 'b')\n", "plt.ylim((-40,10))\n", "plt.ylabel('Amplitude (dB)')\n", "plt.xlabel('Normalized Frequency')\n", "plt.grid()\n", "ax = plt.gca()\n", "ax.xaxis.set_major_formatter(FuncFormatter(\n", " lambda val,pos: '{:.0g}$\\pi$'.format(val) if val !=0 else '0'\n", "))\n", "ax.xaxis.set_major_locator(MultipleLocator(base=0.2))\n", "plt.subplot(2,1,2)\n", "angles = np.angle(h_response)\n", "plt.plot(w/np.pi, angles, 'g')\n", "plt.ylabel('Angle (radians)')\n", "plt.xlabel('Normalized Frequency')\n", "ax = plt.gca()\n", "ax.xaxis.set_major_formatter(FuncFormatter(\n", " lambda val,pos: '{:.0g}$\\pi$'.format(val) if val !=0 else '0'\n", "))\n", "ax.xaxis.set_major_locator(MultipleLocator(base=0.2))\n", "plt.grid()\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "Observe that the specified passband does not go all the way to 0 and 0.5. The further away the passband is from these edges, the less ripples we will have in the passband, and the **more attenuation** we will have for the **negative frequencies**!\n", "\n", "Observe that this design now has a +90 Degrees ($\\pi/2$) phase shift at frequency close to zero. This is a phase difference of 180 Degrees from our previous design with the rectangular window, and results from a sign change of the coefficients.\n", "\n", "Let's look at the resulting **one sided complex valued filter** at the whole frequency circle again, in iPython:\n" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [ { "data": { "text/plain": [ "array([0.-8.35889141e-05j, 0.+7.28072838e-02j, 0.+7.11334936e-05j,\n", " 0.+6.79343477e-02j, 0.-7.21513298e-06j, 0.+1.10111613e-01j,\n", " 0.+2.67809302e-05j, 0.+2.01516354e-01j, 0.-8.96356182e-06j,\n", " 0.+6.32971502e-01j, 1.+0.00000000e+00j, 0.-6.32971502e-01j,\n", " 0.+8.96356182e-06j, 0.-2.01516354e-01j, 0.-2.67809302e-05j,\n", " 0.-1.10111613e-01j, 0.+7.21513298e-06j, 0.-6.79343477e-02j,\n", " 0.-7.11334936e-05j, 0.-7.28072838e-02j, 0.+8.35889141e-05j])" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Delay for the real part:\n", "delt = np.zeros(21)\n", "delt[10] = 1\n", "#The complex filter:\n", "honeremez = delt + 1j*b\n", "honeremez" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support. ' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
');\n", " var titletext = $(\n", " '
');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
');\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('');\n", " button.click(method_name, toolbar_event);\n", " button.mouseover(tooltip, toolbar_mouse_event);\n", " nav_element.append(button);\n", " }\n", "\n", " // Add the status bar.\n", " var status_bar = $('');\n", " nav_element.append(status_bar);\n", " this.message = status_bar[0];\n", "\n", " // Add the close button to the window.\n", " var buttongrp = $('
');\n", " var button = $('');\n", " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", " buttongrp.append(button);\n", " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", " titlebar.prepend(buttongrp);\n", "}\n", "\n", "mpl.figure.prototype._root_extra_style = function(el){\n", " var fig = this\n", " el.on(\"remove\", function(){\n", "\tfig.close_ws(fig, {});\n", " });\n", "}\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(el){\n", " // this is important to make the div 'focusable\n", " el.attr('tabindex', 0)\n", " // reach out to IPython and tell the keyboard manager to turn it's self\n", " // off when our div gets focus\n", "\n", " // location in version 3\n", " if (IPython.notebook.keyboard_manager) {\n", " IPython.notebook.keyboard_manager.register_events(el);\n", " }\n", " else {\n", " // location in version 2\n", " IPython.keyboard_manager.register_events(el);\n", " }\n", "\n", "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", " var manager = IPython.notebook.keyboard_manager;\n", " if (!manager)\n", " manager = IPython.keyboard_manager;\n", "\n", " // Check for shift+enter\n", " if (event.shiftKey && event.which == 13) {\n", " this.canvas_div.blur();\n", " // select the cell after this one\n", " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", " IPython.notebook.select(index + 1);\n", " }\n", "}\n", "\n", "mpl.figure.prototype.handle_save = function(fig, msg) {\n", " fig.ondownload(fig, null);\n", "}\n", "\n", "\n", "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", " // IPython event is triggered only after the cells have been serialised, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", " data = data.data;\n", " }\n", " if (data['text/html'] == html_output) {\n", " return [cell, data, j];\n", " }\n", " }\n", " }\n", " }\n", "}\n", "\n", "// Register the function which deals with the matplotlib target/channel.\n", "// The kernel may be null if the page has been refreshed.\n", "if (IPython.notebook.kernel != null) {\n", " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", "}\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "x = 2*np.sin(np.pi*0.05*np.arange(0, 40))\n", "plt.figure()\n", "plt.plot(x)\n", "plt.grid()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we can filter it with our filter which passes only positive frequencies “hone”, an creates a complex valued signal xhone:" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support. ' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
');\n", " var titletext = $(\n", " '
');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
');\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('');\n", " button.click(method_name, toolbar_event);\n", " button.mouseover(tooltip, toolbar_mouse_event);\n", " nav_element.append(button);\n", " }\n", "\n", " // Add the status bar.\n", " var status_bar = $('');\n", " nav_element.append(status_bar);\n", " this.message = status_bar[0];\n", "\n", " // Add the close button to the window.\n", " var buttongrp = $('
');\n", " var button = $('');\n", " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", " buttongrp.append(button);\n", " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", " titlebar.prepend(buttongrp);\n", "}\n", "\n", "mpl.figure.prototype._root_extra_style = function(el){\n", " var fig = this\n", " el.on(\"remove\", function(){\n", "\tfig.close_ws(fig, {});\n", " });\n", "}\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(el){\n", " // this is important to make the div 'focusable\n", " el.attr('tabindex', 0)\n", " // reach out to IPython and tell the keyboard manager to turn it's self\n", " // off when our div gets focus\n", "\n", " // location in version 3\n", " if (IPython.notebook.keyboard_manager) {\n", " IPython.notebook.keyboard_manager.register_events(el);\n", " }\n", " else {\n", " // location in version 2\n", " IPython.keyboard_manager.register_events(el);\n", " }\n", "\n", "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", " var manager = IPython.notebook.keyboard_manager;\n", " if (!manager)\n", " manager = IPython.keyboard_manager;\n", "\n", " // Check for shift+enter\n", " if (event.shiftKey && event.which == 13) {\n", " this.canvas_div.blur();\n", " // select the cell after this one\n", " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", " IPython.notebook.select(index + 1);\n", " }\n", "}\n", "\n", "mpl.figure.prototype.handle_save = function(fig, msg) {\n", " fig.ondownload(fig, null);\n", "}\n", "\n", "\n", "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", " // IPython event is triggered only after the cells have been serialised, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", " data = data.data;\n", " }\n", " if (data['text/html'] == html_output) {\n", " return [cell, data, j];\n", " }\n", " }\n", " }\n", " }\n", "}\n", "\n", "// Register the function which deals with the matplotlib target/channel.\n", "// The kernel may be null if the page has been refreshed.\n", "if (IPython.notebook.kernel != null) {\n", " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", "}\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.figure()\n", "plt.plot(np.real(xhone))\n", "plt.plot(np.imag(xhone),'r')\n", "plt.plot(np.abs(xhone))\n", "plt.grid()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We see that between about sample 15 and 45 we obtain the **amplitude** of our sinusoidal signal with about **10% accuracy**, which roughly corresponds to the -20dB attenuation (corresponding to an attenuation factor of 0.1) that our filter “hone” provides. This also hints at the fact that we can improve the magnitude estimation by having a filter with a **higher attenuation** at negative frequencies.\n", "\n", "Also observe that this only works for sinusoids inside our\n", "passband!" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.5" }, "livereveal": { "rise": { "height": "90%", "width": "90%" }, "scroll": true, "theme": "sky", "transition": "zoom" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "010411b23dde4ac9b0a3030e14cf116a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "description": "Start", "layout": "IPY_MODEL_6a3bf4da31de478d94493fb7e7bf2612", "style": "IPY_MODEL_28c5906b489444688437bc5e2decf81a" } }, "0124c108c90b41408309aa3aac820c5d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "015addf4649b4d41b3ee5a4e08b1feef": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "01a5f4dbc4064fd3a34973eb916c31c5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_05ed0d85918542ce8e2d2b5a11d7d46c", "style": "IPY_MODEL_11beb2d8d5cb46ccbbbf8aa79a579437" } }, "02c9485b88554eb9992be45d9860b92e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "0301e5ad87f74818b0033801839a6489": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "05ed0d85918542ce8e2d2b5a11d7d46c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "06b3502ca24649cfba2505a7ae4369a3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_d4c25c99462a4868b15757073e777364", "style": "IPY_MODEL_58865ee688c741d484e0a1e5fe729ed1", "value": true } }, "070df1bc17ac48328bf07a4c6bbf4386": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "0889d4344f00492d990089599a0cbb1e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "08bcfe0454894f769d36cf36a969a89c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_ec8397c2b6e5444587135da33d9144fd", "style": "IPY_MODEL_3fe6660526e44cc19947700d461a8a9d", "value": false } }, "0b8e46359cee465aa82778a67f6c0b96": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "0b9a6a693871477ebf610c47a13ce72a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "0d37c449c02940ea80583d16fffe742e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "0fbffec0398544c78cc392a8f3387f8e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "11649f3e118b4488af7188e4a8e73291": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "11beb2d8d5cb46ccbbbf8aa79a579437": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "12c1d6bd34634a1fb100dddc180fee8c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_cbfc931a5e68487a91bda9c791d27a54", "style": "IPY_MODEL_154ee137a89643c596b033dd8318706c", "value": true } }, "1372b726ab434f9b89571f6da34c9e62": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "14129132b8da4c588bdb14db56917502": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "14f182217bd54f0eab515df20a2b5138": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "154ee137a89643c596b033dd8318706c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "16fff80d180c43a599f5bb2e9b551989": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "1a8f9d0d68954f4fa2ce1361633bde98": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "1b001b2ac3e847549ef031ffa10555a7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "1d77796b884c4861a25db47632b8d489": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": {} }, "1e4739a8c3694e0184b1d7a856de0e23": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "1ea7b64595fd40cfa2673963652b111d": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "1f7c5c8eb1f645d0b0b4ffb1db9e262b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "224bcb4dea094163994aaa3f0121c825": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "234045dd6a114ecda45e0086e0d54e99": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "238506e028044b5b881ef74c8ad59846": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "BoundedIntTextModel", "state": { "description": "Bit-Depth:", "layout": "IPY_MODEL_56ad1c5dc11f482f9602ecf86f593745", "max": 16, "min": 2, "style": "IPY_MODEL_f832049896fd43d3a027ac200b0d333a", "value": 8 } }, "25438168806e49268b476a257216e7dd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_ad19b104bd2c4274827935f0bc642e1c" ], "layout": "IPY_MODEL_266d77a5a8bf4ba0b75999d1ff5ec2ba" } }, "266d77a5a8bf4ba0b75999d1ff5ec2ba": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "2770a82d9d574867b924b252a6697fcb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_827b4767fde3485eb5c2b84a93302b94", "style": "IPY_MODEL_9e41a52328224716afc6e66f01c14e6e", "value": true } }, "28c5906b489444688437bc5e2decf81a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": {} }, "2a17130f6ba1491f959d24bee45727aa": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_9eefd0731f5c4392a5acde7f1e933fd5", "style": "IPY_MODEL_1f7c5c8eb1f645d0b0b4ffb1db9e262b", "value": true } }, "2aa28291b0e94968b90bc072bad5692c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "2c0c1ccee30d431c9040ada58fd71129": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "2f2f8d6d9d194d8d81aa9445ae96bc2a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "2f59316910c14ba5a89beb99d1c86a93": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_4d986dc237e54cb58da0435fa72d0f38", "style": "IPY_MODEL_48d6266121a349d48f11378c6804ee61", "value": true } }, "3121709f5a264cf080f39aa0e49e7279": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_f469e7d7b4a541af8a5340dd1d099999", "style": "IPY_MODEL_454bac39d61a47178f95831b6cee19a4" } }, "34f16d143e48488090e222e4ed23e9b8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "367c6ac4f00e4104ba6837f8104dfb9f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "36cef02e3ac343f597afecf7a0da19c4": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "37389e5b17cf48e3a0021f24e6b830b3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "3c934745843a4bdb9ecd61d569af4ee9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "3fe6660526e44cc19947700d461a8a9d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "407419954887424b844182aaf85efb78": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "4181a03ad26243f18c1afcbac62c4b93": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "Mid-Tread", "Mid-Rise" ], "description": "Quantization Type:", "index": 0, "layout": "IPY_MODEL_0b8e46359cee465aa82778a67f6c0b96", "style": "IPY_MODEL_16fff80d180c43a599f5bb2e9b551989" } }, "446d80c629a24e2fa2136e03dfc9d28b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "454bac39d61a47178f95831b6cee19a4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "462478cddfff483e922a3aa095a2e610": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "$\\mu$-Law", "disabled": false, "layout": "IPY_MODEL_78c567360a394eb19dabc832927f8693", "style": "IPY_MODEL_14129132b8da4c588bdb14db56917502", "value": false } }, "476db36e2ef8495598b90265cb380580": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "48d6266121a349d48f11378c6804ee61": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "4d986dc237e54cb58da0435fa72d0f38": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "4db559233bc54c04b701ff71ebc1d55d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "4e02c6cc9f2040c0924a4ba1a152edad": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_8bfde2f187c84f8c936d80d6ab9dd110", "style": "IPY_MODEL_6f86b5e8c23b4820bba2a6a839d624b3", "value": false } }, "50e455fde9824f468875e0b897625f4c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "510465f7cad54c2db0e18fd7acd3311a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "5254bdb17cad4908be4e921410737e7b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "5518002733dd4d23addee1dcd5b0a5be": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "56ad1c5dc11f482f9602ecf86f593745": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "56c77fc92d1f40619026d3fbdd034c3a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_e099daeead614c06ba66a3b6aa2a6519", "style": "IPY_MODEL_1e4739a8c3694e0184b1d7a856de0e23", "value": true } }, "58865ee688c741d484e0a1e5fe729ed1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "5d021f3d3f104103af22aff0c388a31d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_c63e57f2060841f7aa9fb386480ae645", "style": "IPY_MODEL_ec805846f5734669b7fcc4fd0ea88cde" } }, "5e6239c4e5a14abba70b63e1be1f8edc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_070df1bc17ac48328bf07a4c6bbf4386", "style": "IPY_MODEL_cae0d9b30a044bcdbb4646d2a824b06f", "value": true } }, "601904b20a9e40c2bd92ae3569f3ff8b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "60bf9fcb59ec405fbb5f47ca2b2cd2ff": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "617d2172171e4d4295d316b69ab86083": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "61ec3ac37e444c2fa3488f5b29b80e8e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "654babd4900b4e1d91e2eb5889a5db49": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "6a3bf4da31de478d94493fb7e7bf2612": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "6f85734c28af439a8da835c83e71c0c6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_617d2172171e4d4295d316b69ab86083", "style": "IPY_MODEL_1d77796b884c4861a25db47632b8d489" } }, "6f86b5e8c23b4820bba2a6a839d624b3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "6fdb7d274eab44d2aaf38dd4dcfa0511": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "72a59b1fcaff4177ba91b8edb4fb23bd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_1372b726ab434f9b89571f6da34c9e62", "style": "IPY_MODEL_2aa28291b0e94968b90bc072bad5692c", "value": false } }, "739b843557fd4432826a28261e5b827e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_98cc8cdb6e87466a8f357e995b2a13e9", "style": "IPY_MODEL_224bcb4dea094163994aaa3f0121c825", "value": false } }, "73b4db0032014d44a57d71fb87786ee8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_446d80c629a24e2fa2136e03dfc9d28b", "style": "IPY_MODEL_4db559233bc54c04b701ff71ebc1d55d", "value": false } }, "779d357055284d7d839ee1ba611221e8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "7836a2e5f5404d26ac461945a2ea0619": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_e8f0676ca8644d3ea28ffb8dd3c7964a", "style": "IPY_MODEL_dbd4fc6f05344d3893968667ea288e00", "value": true } }, "78c567360a394eb19dabc832927f8693": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "7bec54694ea94b16aa7ddae3004a6907": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_238506e028044b5b881ef74c8ad59846" ], "layout": "IPY_MODEL_234045dd6a114ecda45e0086e0d54e99" } }, "7f64dea70b79470aa30508c8f0c20150": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_779d357055284d7d839ee1ba611221e8", "style": "IPY_MODEL_81f45b5f76104f8a980503f3e39332bb", "value": true } }, "81f45b5f76104f8a980503f3e39332bb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "827b4767fde3485eb5c2b84a93302b94": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "89d29651e3da4f80ade582061a753d91": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_2c0c1ccee30d431c9040ada58fd71129", "style": "IPY_MODEL_50e455fde9824f468875e0b897625f4c", "value": true } }, "8a74d386afe84ce4addc6ed37dbc8b43": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "8aeb4d884e904dfe8c13404fefd0ef6f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "BoundedIntTextModel", "state": { "description": "Bit-Depth:", "layout": "IPY_MODEL_a512d148087f4555b6bceeca8d4ea7a2", "max": 16, "min": 2, "style": "IPY_MODEL_5254bdb17cad4908be4e921410737e7b", "value": 8 } }, "8bfde2f187c84f8c936d80d6ab9dd110": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "8f46384b6f4a405e8d409f9169c78e7e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Filter ON / OFF", "disabled": false, "layout": "IPY_MODEL_0889d4344f00492d990089599a0cbb1e", "style": "IPY_MODEL_0d37c449c02940ea80583d16fffe742e", "value": false } }, "8f63fda556ae49eea3ef4be03fdd736a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_ae6ab56d84d049e8b3a4a6453ee62cb7", "style": "IPY_MODEL_34f16d143e48488090e222e4ed23e9b8" } }, "94b8806eb4eb41c29262f6f79153bdaa": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "98cc8cdb6e87466a8f357e995b2a13e9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "995a134e1ab64d7894796fb26f40bc17": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_1ea7b64595fd40cfa2673963652b111d", "style": "IPY_MODEL_c0ec329452b8419e8fca9585c23830f5", "value": true } }, "9e41a52328224716afc6e66f01c14e6e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "9eefd0731f5c4392a5acde7f1e933fd5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "a105b9301e4e467b8f27efd88b0dd027": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "$\\mu$-Law", "disabled": false, "layout": "IPY_MODEL_02c9485b88554eb9992be45d9860b92e", "style": "IPY_MODEL_37389e5b17cf48e3a0021f24e6b830b3", "value": false } }, "a1f23f60b3804a438ade7232ff60fcbb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "a512d148087f4555b6bceeca8d4ea7a2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "a9bb349daa464892b27872b4417ecfe7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_8a74d386afe84ce4addc6ed37dbc8b43", "style": "IPY_MODEL_5518002733dd4d23addee1dcd5b0a5be", "value": true } }, "aa489c5c6242430bb9ef76d4460d61b5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "aba73fc98ae34b8e965b730c3c422205": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "ad19b104bd2c4274827935f0bc642e1c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "Mid-Tread", "Mid-Rise" ], "description": "Quantization Type:", "index": 0, "layout": "IPY_MODEL_476db36e2ef8495598b90265cb380580", "style": "IPY_MODEL_c7f454f84a4c4ffabeca0e6b66fd00c4" } }, "ae6ab56d84d049e8b3a4a6453ee62cb7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "b7257f546d6542c08e06a519a7cfcff9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "bdb731b1250b48f6b81ae85d8318b6dc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": {} }, "bf97deef015c4827a8967a671813f149": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_aa489c5c6242430bb9ef76d4460d61b5", "style": "IPY_MODEL_1a8f9d0d68954f4fa2ce1361633bde98" } }, "c0ec329452b8419e8fca9585c23830f5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "c1920bdff8b14c4fa8e114b3921d9ade": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_4181a03ad26243f18c1afcbac62c4b93" ], "layout": "IPY_MODEL_a1f23f60b3804a438ade7232ff60fcbb" } }, "c1b15833557f464eac95808260cf7566": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "c47984031d354d7bb041c39975e4cb8c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_3c934745843a4bdb9ecd61d569af4ee9", "style": "IPY_MODEL_015addf4649b4d41b3ee5a4e08b1feef", "value": true } }, "c4d45858b9284681914cf8fde9407c40": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "c63e57f2060841f7aa9fb386480ae645": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "c7d3112a971e4497b7fd873765aed42d": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "c7f454f84a4c4ffabeca0e6b66fd00c4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "c7fbe564a4d347cf95431aaac7d3e642": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Filter ON / OFF", "disabled": false, "layout": "IPY_MODEL_fcb62edcc335410bb627670dc539b165", "style": "IPY_MODEL_0301e5ad87f74818b0033801839a6489", "value": false } }, "cae0d9b30a044bcdbb4646d2a824b06f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "cbfa24b75cc64fddbd7a4eab87c56c46": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_fe565191de1540f5b0197219c460af56", "IPY_MODEL_8f63fda556ae49eea3ef4be03fdd736a", "IPY_MODEL_a105b9301e4e467b8f27efd88b0dd027" ], "layout": "IPY_MODEL_1b001b2ac3e847549ef031ffa10555a7" } }, "cbfc931a5e68487a91bda9c791d27a54": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "cff4dfddc8ee4f25a80a855bdc65994f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "d2a3e1a11bc648cbac44ac8d661fcaae": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_c7d3112a971e4497b7fd873765aed42d", "style": "IPY_MODEL_2f2f8d6d9d194d8d81aa9445ae96bc2a", "value": true } }, "d3450ad02abc46db9032268bf51cf3a2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "d4c25c99462a4868b15757073e777364": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "d559cd1da181460381dcc77443386833": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": {} }, "d768baa1b42743999d0fb702cc36436b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_510465f7cad54c2db0e18fd7acd3311a", "style": "IPY_MODEL_c4d45858b9284681914cf8fde9407c40" } }, "da223fb00a7e46f6a12a63b53e4f3d9c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": {} }, "dae75bebe0544ee88cd1071b3f87ff71": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "dbd4fc6f05344d3893968667ea288e00": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "dc77a42f93fd481294243d614e2c45ef": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_6fdb7d274eab44d2aaf38dd4dcfa0511", "style": "IPY_MODEL_0b9a6a693871477ebf610c47a13ce72a", "value": true } }, "de50b7858d7b4a61a73d48e05979efd0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_c1b15833557f464eac95808260cf7566", "style": "IPY_MODEL_f72874debb174930bd5932bbb19febf4", "value": true } }, "e099daeead614c06ba66a3b6aa2a6519": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "e139e8ce24694bdda7967b2165ee342c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_94b8806eb4eb41c29262f6f79153bdaa", "style": "IPY_MODEL_dae75bebe0544ee88cd1071b3f87ff71", "value": true } }, "e21b1e3534264dee880c06651548e1a9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Filter ON / OFF", "disabled": false, "layout": "IPY_MODEL_407419954887424b844182aaf85efb78", "style": "IPY_MODEL_601904b20a9e40c2bd92ae3569f3ff8b", "value": false } }, "e51f5a36e4394ed689235a9794c618c1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_b7257f546d6542c08e06a519a7cfcff9", "style": "IPY_MODEL_0124c108c90b41408309aa3aac820c5d", "value": true } }, "e5505837f6154a0cae1a17c207323d4e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "disabled": true, "layout": "IPY_MODEL_36cef02e3ac343f597afecf7a0da19c4", "style": "IPY_MODEL_60bf9fcb59ec405fbb5f47ca2b2cd2ff", "value": true } }, "e5d441cf0b974fe5926d4f430e662b4a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Downsampling with Zeros", "disabled": false, "layout": "IPY_MODEL_11649f3e118b4488af7188e4a8e73291", "style": "IPY_MODEL_367c6ac4f00e4104ba6837f8104dfb9f", "value": false } }, "e7ffbebd8eea4250a1ff0c0a7ae94732": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "e8f0676ca8644d3ea28ffb8dd3c7964a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "e9d3c86d3a7c49b799bdcc77191aa62a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_14f182217bd54f0eab515df20a2b5138", "style": "IPY_MODEL_da223fb00a7e46f6a12a63b53e4f3d9c" } }, "ec805846f5734669b7fcc4fd0ea88cde": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "ec8397c2b6e5444587135da33d9144fd": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "f2232b0768124cf1804c9bc977ca3bc6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_aba73fc98ae34b8e965b730c3c422205", "style": "IPY_MODEL_bdb731b1250b48f6b81ae85d8318b6dc" } }, "f2a8b23362844b65b7cc51c15b54f5cc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "description": "Stop", "layout": "IPY_MODEL_e7ffbebd8eea4250a1ff0c0a7ae94732", "style": "IPY_MODEL_d3450ad02abc46db9032268bf51cf3a2", "value": true } }, "f469e7d7b4a541af8a5340dd1d099999": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "f6566c5300744aa18d1396449e916c5b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_8aeb4d884e904dfe8c13404fefd0ef6f" ], "layout": "IPY_MODEL_cff4dfddc8ee4f25a80a855bdc65994f" } }, "f65b6c16536047758adf05ecea12612b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "f72874debb174930bd5932bbb19febf4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "f7e7bb40afba4448b0c4506aed91c05a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_010411b23dde4ac9b0a3030e14cf116a", "IPY_MODEL_d768baa1b42743999d0fb702cc36436b", "IPY_MODEL_462478cddfff483e922a3aa095a2e610" ], "layout": "IPY_MODEL_0fbffec0398544c78cc392a8f3387f8e" } }, "f832049896fd43d3a027ac200b0d333a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "faa54a294c694e0cabe60970ddf2b77a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "CheckboxModel", "state": { "description": "Filter ON / OFF", "disabled": false, "layout": "IPY_MODEL_61ec3ac37e444c2fa3488f5b29b80e8e", "style": "IPY_MODEL_f65b6c16536047758adf05ecea12612b", "value": false } }, "fcb62edcc335410bb627670dc539b165": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "fe565191de1540f5b0197219c460af56": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "description": "Start", "layout": "IPY_MODEL_654babd4900b4e1d91e2eb5889a5db49", "style": "IPY_MODEL_d559cd1da181460381dcc77443386833" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }