{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Ltlcross wrapper" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import spot\n", "from spot.jupyter import display_inline\n", "from ltlcross_wrapper import Modulizer, ResAnalyzer\n", "\n", "spot.setup()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's create some file with formulas that we can play with" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "formula_file = \"random.ltl\"\n", "name = \"random\"\n", "tools = {\n", " \"small\" : \"ltl2tgba\",\n", " \"det-TGBA\" : \"ltl2tgba -H -D %f>%O\",\n", " \"det-EL\" : \"ltl2tgba -H -D -G %f>%O\",\n", "}" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "randltl = spot.randltl(4, 500)\n", "\n", "with open(formula_file, \"w\") as file:\n", " for f in randltl:\n", " print(f, file=file)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Modulizer\n", "Let's run modulizer on these formulas using up to 6 processes" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "m = Modulizer(tools, formula_file, name=name, processes=6)\n", "m.run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Analyzing the results using `ResAnalyzer`\n", "By specifying `cols` we say the analyzer which columns from the results it should gather." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "cols = [\"states\", \"transitions\", \"acc\", \"nondet_states\"]\n", "a = ResAnalyzer(f\"{name}.csv\", cols=cols)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
acc nondet_states states transitions
tool
det-EL5660228014633
det-TGBA520359215513014
small505408208112433
" ], "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.cumulative(col=cols)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`cumulative` takes `tool_subset` as an arguments, which restricts the computation to the given subset of tools. Only formulas with timeouts within the given tool subset are removed from the sum. Run the following command to obtain results where all formulas with some timeout are removed.\n", "```python\n", "analyzer.cumulative().loc[tool_subset]\n", "```" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
det-EL det-TGBA small V
det-ELnan7878156
det-TGBA76nan076
small10832nan140
" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.cross_compare(highlight=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's see the cases where the fully deterministic automaton with EL acceptance produces smaller automaton than `small`" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
columnstates
tooldet-ELsmall
form_idformula
3F(p0 R p1)23
4G(p1 | Fp1) W (FGp2 R !p2)45
10X((Fp2 W Xp0) <-> (p2 <-> (p1 U Fp3)))2129
34F(!p1 | GXp2)23
39Xp3 R (p2 <-> (1 U Xp1))68
............
458!(Xp1 xor ((!p1 R Xp3) R (p1 M 1)))1213
478FG(XFp1 | (Fp3 -> !p3))13
484F!(!p0 M Fp0)23
488G(Xp0 M 1) -> p034
499F((Xp0 W Gp1) | F!(!p1 xor p3))34
\n", "

69 rows × 2 columns

\n", "
" ], "text/plain": [ "column states \n", "tool det-EL small\n", "form_id formula \n", "3 F(p0 R p1) 2 3\n", "4 G(p1 | Fp1) W (FGp2 R !p2) 4 5\n", "10 X((Fp2 W Xp0) <-> (p2 <-> (p1 U Fp3))) 21 29\n", "34 F(!p1 | GXp2) 2 3\n", "39 Xp3 R (p2 <-> (1 U Xp1)) 6 8\n", "... ... ...\n", "458 !(Xp1 xor ((!p1 R Xp3) R (p1 M 1))) 12 13\n", "478 FG(XFp1 | (Fp3 -> !p3)) 1 3\n", "484 F!(!p0 M Fp0) 2 3\n", "488 G(Xp0 M 1) -> p0 3 4\n", "499 F((Xp0 W Gp1) | F!(!p1 xor p3)) 3 4\n", "\n", "[69 rows x 2 columns]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.better_than(\"det-EL\",\"small\",compare_on=[\"states\"])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There is also an equivalent for the above. Use\n", "```python\n", "reverse=True\n", "```\n", "to swap the tools" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
columnstates
tooldet-ELsmall
form_idformula
0Xp1 R ((Gp1 R p2) W p3)1110
8XXG((Xp1 R (p0 W p3)) -> (p2 R GXp0))106
13(X!p0 -> G(Gp1 | Xp2)) W p275
16(p0 U (0 R p2)) R (p0 R Xp1)85
24F(!p2 <-> F(Fp1 R p3))157
............
476Fp2 M (Xp2 | (p1 <-> ((p2 | p3) W p1)))76
481(Gp0 R p3) <-> (!p2 U p0)98
489((p3 | (p1 U p0)) -> p3) M Xp176
492(!Fp1 R (Fp3 xor Gp2)) M Fp2148
498(p2 -> Xp2) -> Gp054
\n", "

82 rows × 2 columns

\n", "
" ], "text/plain": [ "column states \n", "tool det-EL small\n", "form_id formula \n", "0 Xp1 R ((Gp1 R p2) W p3) 11 10\n", "8 XXG((Xp1 R (p0 W p3)) -> (p2 R GXp0)) 10 6\n", "13 (X!p0 -> G(Gp1 | Xp2)) W p2 7 5\n", "16 (p0 U (0 R p2)) R (p0 R Xp1) 8 5\n", "24 F(!p2 <-> F(Fp1 R p3)) 15 7\n", "... ... ...\n", "476 Fp2 M (Xp2 | (p1 <-> ((p2 | p3) W p1))) 7 6\n", "481 (Gp0 R p3) <-> (!p2 U p0) 9 8\n", "489 ((p3 | (p1 U p0)) -> p3) M Xp1 7 6\n", "492 (!Fp1 R (Fp3 xor Gp2)) M Fp2 14 8\n", "498 (p2 -> Xp2) -> Gp0 5 4\n", "\n", "[82 rows x 2 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.smaller_than(\"det-EL\",\"small\",reverse=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Scatter plots\n", "For better feel about the size differences, we can use a scatter plot. By default, the color of the marks represent the number of cases with the same automata sizes. By clicking one of the dots, we can get a command for displaying exactly the cases represented by the dot (see the cell bellow the scatter plot and try yourself)." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " Loading BokehJS ...\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n", " root._bokeh_onload_callbacks = [];\n", " root._bokeh_is_loading = undefined;\n", " }\n", "\n", " var JS_MIME_TYPE = 'application/javascript';\n", " var HTML_MIME_TYPE = 'text/html';\n", " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " var CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " var script = document.createElement(\"script\");\n", " node.appendChild(script);\n", " }\n", "\n", " /**\n", " * Handle when an output is cleared or removed\n", " */\n", " function handleClearOutput(event, handle) {\n", " var cell = handle.cell;\n", "\n", " var id = cell.output_area._bokeh_element_id;\n", " var server_id = cell.output_area._bokeh_server_id;\n", " // Clean up Bokeh references\n", " if (id != null && id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", " cell.notebook.kernel.execute(cmd, {\n", " iopub: {\n", " output: function(msg) {\n", " var id = msg.content.text.trim();\n", " if (id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " var output_area = handle.output_area;\n", " var output = handle.output;\n", "\n", " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", " return\n", " }\n", "\n", " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", "\n", " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", " // store reference to embed id on output_area\n", " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", " }\n", " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", " var bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " var script_attrs = bk_div.children[0].attributes;\n", " for (var i = 0; i < script_attrs.length; i++) {\n", " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", " }\n", " // store reference to server id on output_area\n", " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", " }\n", " }\n", "\n", " function register_renderer(events, OutputArea) {\n", "\n", " function append_mime(data, metadata, element) {\n", " // create a DOM node to render to\n", " var toinsert = this.create_output_subarea(\n", " metadata,\n", " CLASS_NAME,\n", " EXEC_MIME_TYPE\n", " );\n", " this.keyboard_manager.register_events(toinsert);\n", " // Render to node\n", " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", " render(props, toinsert[toinsert.length - 1]);\n", " element.append(toinsert);\n", " return toinsert\n", " }\n", "\n", " /* Handle when an output is cleared or removed */\n", " events.on('clear_output.CodeCell', handleClearOutput);\n", " events.on('delete.Cell', handleClearOutput);\n", "\n", " /* Handle when a new output is added */\n", " events.on('output_added.OutputArea', handleAddOutput);\n", "\n", " /**\n", " * Register the mime type and append_mime function with output_area\n", " */\n", " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", " /* Is output safe? */\n", " safe: true,\n", " /* Index of renderer in `output_area.display_order` */\n", " index: 0\n", " });\n", " }\n", "\n", " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", " if (root.Jupyter !== undefined) {\n", " var events = require('base/js/events');\n", " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", "\n", " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", " register_renderer(events, OutputArea);\n", " }\n", " }\n", "\n", " \n", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"

\\n\"+\n", " \"
    \\n\"+\n", " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded() {\n", " var el = document.getElementById(\"1001\");\n", " if (el != null) {\n", " el.textContent = \"BokehJS is loading...\";\n", " }\n", " if (root.Bokeh !== undefined) {\n", " if (el != null) {\n", " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", "\n", " function run_callbacks() {\n", " try {\n", " root._bokeh_onload_callbacks.forEach(function(callback) {\n", " if (callback != null)\n", " callback();\n", " });\n", " } finally {\n", " delete root._bokeh_onload_callbacks\n", " }\n", " console.debug(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(css_urls, js_urls, callback) {\n", " if (css_urls == null) css_urls = [];\n", " if (js_urls == null) js_urls = [];\n", "\n", " root._bokeh_onload_callbacks.push(callback);\n", " if (root._bokeh_is_loading > 0) {\n", " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", " return null;\n", " }\n", " if (js_urls == null || js_urls.length === 0) {\n", " run_callbacks();\n", " return null;\n", " }\n", " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", " root._bokeh_is_loading = css_urls.length + js_urls.length;\n", "\n", " function on_load() {\n", " root._bokeh_is_loading--;\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", " run_callbacks()\n", " }\n", " }\n", "\n", " function on_error() {\n", " console.error(\"failed to load \" + url);\n", " }\n", "\n", " for (var i = 0; i < css_urls.length; i++) {\n", " var url = css_urls[i];\n", " const element = document.createElement(\"link\");\n", " element.onload = on_load;\n", " element.onerror = on_error;\n", " element.rel = \"stylesheet\";\n", " element.type = \"text/css\";\n", " element.href = url;\n", " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", " document.body.appendChild(element);\n", " }\n", "\n", " for (var i = 0; i < js_urls.length; i++) {\n", " var url = js_urls[i];\n", " var element = document.createElement('script');\n", " element.onload = on_load;\n", " element.onerror = on_error;\n", " element.async = false;\n", " element.src = url;\n", " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", " document.head.appendChild(element);\n", " }\n", " };var element = document.getElementById(\"1001\");\n", " if (element == null) {\n", " console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1001' but no matching script tag was found. \")\n", " return false;\n", " }\n", "\n", " function inject_raw_css(css) {\n", " const element = document.createElement(\"style\");\n", " element.appendChild(document.createTextNode(css));\n", " document.body.appendChild(element);\n", " }\n", "\n", " \n", " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.4.0.min.js\"];\n", " var css_urls = [];\n", " \n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " Bokeh.set_log_level(\"info\");\n", " },\n", " function(Bokeh) {\n", " \n", " \n", " }\n", " ];\n", "\n", " function run_inline_js() {\n", " \n", " if (root.Bokeh !== undefined || force === true) {\n", " \n", " for (var i = 0; i < inline_js.length; i++) {\n", " inline_js[i].call(root, root.Bokeh);\n", " }\n", " if (force === true) {\n", " display_loaded();\n", " }} else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(run_inline_js, 100);\n", " } else if (!root._bokeh_failed_load) {\n", " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", " root._bokeh_failed_load = true;\n", " } else if (force !== true) {\n", " var cell = $(document.getElementById(\"1001\")).parents('.cell').data().cell;\n", " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", " }\n", "\n", " }\n", "\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", " run_inline_js();\n", " } else {\n", " load_libs(css_urls, js_urls, function() {\n", " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", " run_inline_js();\n", " });\n", " }\n", "}(window));" ], "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"1001\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };var element = document.getElementById(\"1001\");\n if (element == null) {\n console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1001' but no matching script tag was found. \")\n return false;\n }\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.4.0.min.js\"];\n var css_urls = [];\n \n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"1001\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " \n", " var docs_json = {\"bb55ff27-cc6c-4858-a584-659011f9409b\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1013\",\"type\":\"LinearAxis\"}],\"center\":[{\"id\":\"1017\",\"type\":\"Grid\"},{\"id\":\"1022\",\"type\":\"Grid\"},{\"id\":\"1039\",\"type\":\"Slope\"}],\"left\":[{\"id\":\"1018\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"1043\",\"type\":\"GlyphRenderer\"}],\"right\":[{\"id\":\"1049\",\"type\":\"ColorBar\"}],\"title\":{\"id\":\"1003\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"1029\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"1005\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"1009\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"1007\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"1011\",\"type\":\"LinearScale\"}},\"id\":\"1002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1055\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null},\"id\":\"1007\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data_source\":{\"id\":\"1036\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1041\",\"type\":\"Scatter\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1042\",\"type\":\"Scatter\"},\"selection_glyph\":null,\"view\":{\"id\":\"1044\",\"type\":\"CDSView\"}},\"id\":\"1043\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"1059\",\"type\":\"BoxAnnotation\"}},\"id\":\"1025\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1009\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":{\"id\":\"1038\",\"type\":\"CustomJS\"}},\"id\":\"1045\",\"type\":\"TapTool\"},{\"attributes\":{\"ticker\":{\"id\":\"1014\",\"type\":\"BasicTicker\"}},\"id\":\"1017\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1026\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"field\":\"count\",\"transform\":{\"id\":\"1037\",\"type\":\"LinearColorMapper\"}},\"line_color\":{\"field\":\"count\",\"transform\":{\"id\":\"1037\",\"type\":\"LinearColorMapper\"}},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"det-EL\"},\"y\":{\"field\":\"small\"}},\"id\":\"1041\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1051\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"det-EL\",\"@{det-EL}\"],[\"small\",\"@{small}\"],[\"count\",\"@count\"]]},\"id\":\"1047\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1014\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1057\",\"type\":\"Selection\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1023\",\"type\":\"PanTool\"},{\"id\":\"1024\",\"type\":\"WheelZoomTool\"},{\"id\":\"1025\",\"type\":\"BoxZoomTool\"},{\"id\":\"1026\",\"type\":\"SaveTool\"},{\"id\":\"1027\",\"type\":\"ResetTool\"},{\"id\":\"1028\",\"type\":\"HelpTool\"},{\"id\":\"1045\",\"type\":\"TapTool\"},{\"id\":\"1047\",\"type\":\"HoverTool\"}]},\"id\":\"1029\",\"type\":\"Toolbar\"},{\"attributes\":{\"color_mapper\":{\"id\":\"1037\",\"type\":\"LinearColorMapper\"},\"formatter\":{\"id\":\"1055\",\"type\":\"BasicTickFormatter\"},\"location\":[0,0],\"ticker\":{\"id\":\"1056\",\"type\":\"BasicTicker\"},\"width\":16},\"id\":\"1049\",\"type\":\"ColorBar\"},{\"attributes\":{},\"id\":\"1011\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"data\":{\"count\":[14,2,12,2,12,3,5,5,2,1,1,1,10,1,1,7,5,1,4,2,5,2,1,1,1,2,4,2,3,5,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1],\"det-EL\":[1,1,2,3,3,3,4,4,4,4,5,5,5,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,12,13,13,13,14,14,15,15,17,18,19,20,20,21,22,26,30,49],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],\"small\":[2,3,3,2,4,5,3,5,6,7,2,3,4,3,4,5,7,8,4,5,6,8,10,11,5,6,7,9,6,7,8,5,6,7,11,7,8,10,12,7,8,9,10,13,6,11,16,8,16,7,12,14,7,16,4,8,29,10,6,7,10]},\"selected\":{\"id\":\"1057\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1058\",\"type\":\"UnionRenderers\"}},\"id\":\"1036\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1056\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1058\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1023\",\"type\":\"PanTool\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"1036\",\"type\":\"ColumnDataSource\"}},\"code\":\"\\n // Select the data\\n var inds = source.selected.indices;\\n var data = source.data;\\n var x = data['det-EL'][inds];\\n var y = data['small'][inds];\\n\\n // Create the two commands\\n var fst_row = \\\"data = a.get_plot_data('det-EL','small',add_count=False)\\\";\\n var snd_row = \\\"data[(data['det-EL'] == \\\" + x + \\\") & (data['small'] == \\\" + y + \\\")]\\\";\\n\\n // Instructions\\n var instructions = \\\"Use the following code to list the formulas.\\\\n\\\";\\n instructions += \\\"Replace `a` with the ResAnalyzer` object:\\\\n\\\\n\\\"\\n alert(instructions + fst_row + \\\"\\\\n\\\" + snd_row);\\n \"},\"id\":\"1038\",\"type\":\"CustomJS\"},{\"attributes\":{\"callback\":null},\"id\":\"1005\",\"type\":\"DataRange1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1059\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1019\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"det-EL\"},\"y\":{\"field\":\"small\"}},\"id\":\"1042\",\"type\":\"Scatter\"},{\"attributes\":{\"dimension\":1,\"ticker\":{\"id\":\"1019\",\"type\":\"BasicTicker\"}},\"id\":\"1022\",\"type\":\"Grid\"},{\"attributes\":{\"gradient\":1,\"line_color\":{\"value\":\"orange\"},\"line_dash\":[6],\"line_width\":{\"value\":2},\"y_intercept\":0},\"id\":\"1039\",\"type\":\"Slope\"},{\"attributes\":{\"axis_label\":\"small\",\"formatter\":{\"id\":\"1051\",\"type\":\"BasicTickFormatter\"},\"ticker\":{\"id\":\"1019\",\"type\":\"BasicTicker\"}},\"id\":\"1018\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"det-EL\",\"formatter\":{\"id\":\"1053\",\"type\":\"BasicTickFormatter\"},\"ticker\":{\"id\":\"1014\",\"type\":\"BasicTicker\"}},\"id\":\"1013\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1053\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"high\":14,\"low\":1,\"palette\":[\"#000c7c\",\"#000c7e\",\"#000d80\",\"#000d82\",\"#000e83\",\"#000e85\",\"#000f87\",\"#000f89\",\"#00108b\",\"#00108c\",\"#00118e\",\"#001290\",\"#001292\",\"#001393\",\"#001395\",\"#001497\",\"#001598\",\"#00159a\",\"#00169c\",\"#00179d\",\"#00179f\",\"#0018a0\",\"#0019a2\",\"#001aa3\",\"#001aa5\",\"#001ba6\",\"#001ca8\",\"#001da9\",\"#001eab\",\"#001eac\",\"#001fad\",\"#0020af\",\"#0021b0\",\"#0022b1\",\"#0023b2\",\"#0024b3\",\"#0025b4\",\"#0026b5\",\"#0027b6\",\"#0028b7\",\"#0029b8\",\"#002ab8\",\"#002bb9\",\"#002cba\",\"#002eba\",\"#002fba\",\"#0030bb\",\"#0031bb\",\"#0033bb\",\"#0034bb\",\"#0035bb\",\"#0036bb\",\"#0037bb\",\"#0039bb\",\"#003abb\",\"#003bbb\",\"#003cbb\",\"#003dbb\",\"#003fba\",\"#0040ba\",\"#0041ba\",\"#0042b9\",\"#0043b9\",\"#0045b8\",\"#0046b8\",\"#0047b7\",\"#0048b6\",\"#0049b6\",\"#004ab5\",\"#004cb4\",\"#004db3\",\"#004eb2\",\"#004fb2\",\"#0050b1\",\"#0052b0\",\"#0053ae\",\"#0054ad\",\"#0055ac\",\"#0056ab\",\"#0057aa\",\"#0059a9\",\"#005aa8\",\"#005ba7\",\"#005ca5\",\"#005da4\",\"#005fa3\",\"#0060a2\",\"#0061a1\",\"#0062a0\",\"#00639e\",\"#00649d\",\"#00659c\",\"#00679b\",\"#00689a\",\"#006998\",\"#006a97\",\"#006b96\",\"#006c95\",\"#006d93\",\"#006f92\",\"#007091\",\"#00718f\",\"#00728e\",\"#00738d\",\"#00748b\",\"#00758a\",\"#007689\",\"#007887\",\"#007986\",\"#007a84\",\"#007b83\",\"#007c81\",\"#007d80\",\"#007e7e\",\"#007f7d\",\"#00807b\",\"#008279\",\"#008377\",\"#008476\",\"#028574\",\"#068672\",\"#098770\",\"#0d886e\",\"#10896c\",\"#128a6a\",\"#158b68\",\"#178c66\",\"#198d63\",\"#1b8e61\",\"#1d905f\",\"#1f915c\",\"#20925a\",\"#229358\",\"#239455\",\"#259552\",\"#269650\",\"#28974d\",\"#29984a\",\"#2a9948\",\"#2b9a45\",\"#2c9b43\",\"#2c9c40\",\"#2d9d3e\",\"#2d9e3b\",\"#2e9f39\",\"#2ea037\",\"#2fa135\",\"#2fa232\",\"#2fa330\",\"#30a52e\",\"#30a62c\",\"#30a72a\",\"#30a828\",\"#30a926\",\"#31aa25\",\"#31ab23\",\"#31ac21\",\"#31ad20\",\"#31ae1f\",\"#31af1d\",\"#31b01c\",\"#31b11b\",\"#31b21a\",\"#32b31a\",\"#32b41a\",\"#32b519\",\"#32b619\",\"#32b719\",\"#32b819\",\"#32b919\",\"#32ba19\",\"#32bb19\",\"#33bc19\",\"#33bd19\",\"#33be19\",\"#33bf19\",\"#33c019\",\"#33c119\",\"#33c219\",\"#33c319\",\"#34c519\",\"#34c619\",\"#34c719\",\"#34c819\",\"#34c919\",\"#34ca19\",\"#35cb19\",\"#35cc19\",\"#35cd19\",\"#35ce19\",\"#35cf19\",\"#35d019\",\"#36d119\",\"#36d219\",\"#36d319\",\"#36d419\",\"#37d519\",\"#38d619\",\"#3bd719\",\"#3dd819\",\"#40d919\",\"#44da19\",\"#47da19\",\"#4bdb19\",\"#4fdc1a\",\"#53dd1a\",\"#57de1a\",\"#5ade1a\",\"#5edf1a\",\"#62e01a\",\"#66e01a\",\"#6ae11a\",\"#6ee21a\",\"#72e21a\",\"#76e31a\",\"#7ae31b\",\"#7ee41b\",\"#82e51b\",\"#86e51b\",\"#8ae61b\",\"#8ee61b\",\"#91e71b\",\"#95e71b\",\"#99e81c\",\"#9de81c\",\"#a1e91c\",\"#a4e91c\",\"#a8ea1c\",\"#acea1c\",\"#b0ea1c\",\"#b3eb1d\",\"#b7eb1d\",\"#bbec1d\",\"#beec1d\",\"#c2ec1d\",\"#c6ed1e\",\"#c9ed1e\",\"#cded1e\",\"#d1ee1e\",\"#d4ee1e\",\"#d8ee1f\",\"#dcee1f\",\"#dfef1f\",\"#e3ef1f\",\"#e7ef20\",\"#eaef20\",\"#eef020\",\"#f2f020\",\"#f5f021\",\"#f9f021\",\"#fcf021\",\"#fff021\",\"#fff022\",\"#fff122\",\"#fff122\",\"#fff123\"]},\"id\":\"1037\",\"type\":\"LinearColorMapper\"},{\"attributes\":{\"source\":{\"id\":\"1036\",\"type\":\"ColumnDataSource\"}},\"id\":\"1044\",\"type\":\"CDSView\"},{\"attributes\":{\"text\":\"Numbers of states\"},\"id\":\"1003\",\"type\":\"Title\"}],\"root_ids\":[\"1002\"]},\"title\":\"Bokeh Application\",\"version\":\"1.4.0\"}};\n", " var render_items = [{\"docid\":\"bb55ff27-cc6c-4858-a584-659011f9409b\",\"roots\":{\"1002\":\"6be4963b-40c9-4b67-beb6-9b12959a62df\"}}];\n", " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", "\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " var attempts = 0;\n", " var timer = setInterval(function(root) {\n", " if (root.Bokeh !== undefined) {\n", " clearInterval(timer);\n", " embed_document(root);\n", " } else {\n", " attempts++;\n", " if (attempts > 100) {\n", " clearInterval(timer);\n", " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n", " }\n", " }\n", " }, 10, root)\n", " }\n", "})(window);" ], "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "1002" } }, "output_type": "display_data" }, { "data": { "text/html": [ "
Figure(
id = '1002', …)
above = [],
align = 'start',
aspect_ratio = None,
aspect_scale = 1,
background = None,
background_fill_alpha = {'value': 1.0},
background_fill_color = {'value': '#ffffff'},
below = [LinearAxis(id='1013', ...)],
border_fill_alpha = {'value': 1.0},
border_fill_color = {'value': '#ffffff'},
center = [Grid(id='1017', ...), Grid(id='1022', ...), Slope(id='1039', ...)],
css_classes = [],
disabled = False,
extra_x_ranges = {},
extra_y_ranges = {},
frame_height = None,
frame_width = None,
height = None,
height_policy = 'auto',
hidpi = True,
js_event_callbacks = {},
js_property_callbacks = {},
left = [LinearAxis(id='1018', ...)],
lod_factor = 10,
lod_interval = 300,
lod_threshold = 2000,
lod_timeout = 500,
margin = (0, 0, 0, 0),
match_aspect = False,
max_height = None,
max_width = None,
min_border = 5,
min_border_bottom = None,
min_border_left = None,
min_border_right = None,
min_border_top = None,
min_height = None,
min_width = None,
name = None,
outline_line_alpha = {'value': 1.0},
outline_line_cap = 'butt',
outline_line_color = {'value': '#e5e5e5'},
outline_line_dash = [],
outline_line_dash_offset = 0,
outline_line_join = 'bevel',
outline_line_width = {'value': 1},
output_backend = 'canvas',
plot_height = 600,
plot_width = 600,
renderers = [GlyphRenderer(id='1043', ...)],
reset_policy = 'standard',
right = [ColorBar(id='1049', ...)],
sizing_mode = None,
subscribed_events = [],
tags = [],
title = Title(id='1003', ...),
title_location = 'above',
toolbar = Toolbar(id='1029', ...),
toolbar_location = 'right',
toolbar_sticky = True,
visible = True,
width = None,
width_policy = 'auto',
x_range = DataRange1d(id='1005', ...),
x_scale = LinearScale(id='1009', ...),
y_range = DataRange1d(id='1007', ...),
y_scale = LinearScale(id='1011', ...))
\n", "\n" ], "text/plain": [ "Figure(id='1002', ...)" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.bokeh_scatter_plot('det-EL','small')" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "Xp1 | (p3 & ((p1 M GFp1) U X!p0))\n", "\n", "Inf(\n", "\n", ")\n", "[Büchi]\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "I->0\n", "\n", "\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "0->1\n", "\n", "\n", "!p3\n", "\n", "\n", "\n", "2\n", "\n", "2\n", "\n", "\n", "\n", "0->2\n", "\n", "\n", "p3\n", "\n", "\n", "\n", "3\n", "\n", "3\n", "\n", "\n", "\n", "1->3\n", "\n", "\n", "p1\n", "\n", "\n", "\n", "2->3\n", "\n", "\n", "!p0 | p1\n", "\n", "\n", "\n", "4\n", "\n", "4\n", "\n", "\n", "\n", "2->4\n", "\n", "\n", "p0 & !p1\n", "\n", "\n", "\n", "3->3\n", "\n", "\n", "1\n", "\n", "\n", "\n", "\n", "4->4\n", "\n", "\n", "p0\n", "\n", "\n", "\n", "5\n", "\n", "5\n", "\n", "\n", "\n", "4->5\n", "\n", "\n", "!p0\n", "\n", "\n", "\n", "5->5\n", "\n", "\n", "!p1\n", "\n", "\n", "\n", "5->5\n", "\n", "\n", "p1\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "\n", "\n", "\n", "Xp1 | (p3 & ((p1 M GFp1) U X!p0))\n", "\n", "Inf(\n", "\n", ")\n", "[Büchi]\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "I->0\n", "\n", "\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "0->1\n", "\n", "\n", "1\n", "\n", "\n", "\n", "2\n", "\n", "2\n", "\n", "\n", "\n", "0->2\n", "\n", "\n", "p3\n", "\n", "\n", "\n", "3\n", "\n", "3\n", "\n", "\n", "\n", "0->3\n", "\n", "\n", "p3\n", "\n", "\n", "\n", "4\n", "\n", "4\n", "\n", "\n", "\n", "1->4\n", "\n", "\n", "p1\n", "\n", "\n", "\n", "2->4\n", "\n", "\n", "!p0 & !p1\n", "\n", "\n", "\n", "3->3\n", "\n", "\n", "1\n", "\n", "\n", "\n", "5\n", "\n", "5\n", "\n", "\n", "\n", "3->5\n", "\n", "\n", "1\n", "\n", "\n", "\n", "4->4\n", "\n", "\n", "1\n", "\n", "\n", "\n", "\n", "6\n", "\n", "6\n", "\n", "\n", "\n", "5->6\n", "\n", "\n", "!p0\n", "\n", "\n", "\n", "6->6\n", "\n", "\n", "!p1\n", "\n", "\n", "\n", "6->6\n", "\n", "\n", "p1\n", "\n", "\n", "\n", "\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display_inline(a.aut_for_id(47, \"det-EL\"),a.aut_for_id(47, \"small\"))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can also add marks for cases when `tool1` and `tool2` deliver automaton of the same size." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " Loading BokehJS ...\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n", " root._bokeh_onload_callbacks = [];\n", " root._bokeh_is_loading = undefined;\n", " }\n", "\n", " var JS_MIME_TYPE = 'application/javascript';\n", " var HTML_MIME_TYPE = 'text/html';\n", " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " var CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " var script = document.createElement(\"script\");\n", " node.appendChild(script);\n", " }\n", "\n", " /**\n", " * Handle when an output is cleared or removed\n", " */\n", " function handleClearOutput(event, handle) {\n", " var cell = handle.cell;\n", "\n", " var id = cell.output_area._bokeh_element_id;\n", " var server_id = cell.output_area._bokeh_server_id;\n", " // Clean up Bokeh references\n", " if (id != null && id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", " cell.notebook.kernel.execute(cmd, {\n", " iopub: {\n", " output: function(msg) {\n", " var id = msg.content.text.trim();\n", " if (id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " var output_area = handle.output_area;\n", " var output = handle.output;\n", "\n", " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", " return\n", " }\n", "\n", " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", "\n", " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", " // store reference to embed id on output_area\n", " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", " }\n", " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", " var bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " var script_attrs = bk_div.children[0].attributes;\n", " for (var i = 0; i < script_attrs.length; i++) {\n", " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", " }\n", " // store reference to server id on output_area\n", " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", " }\n", " }\n", "\n", " function register_renderer(events, OutputArea) {\n", "\n", " function append_mime(data, metadata, element) {\n", " // create a DOM node to render to\n", " var toinsert = this.create_output_subarea(\n", " metadata,\n", " CLASS_NAME,\n", " EXEC_MIME_TYPE\n", " );\n", " this.keyboard_manager.register_events(toinsert);\n", " // Render to node\n", " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", " render(props, toinsert[toinsert.length - 1]);\n", " element.append(toinsert);\n", " return toinsert\n", " }\n", "\n", " /* Handle when an output is cleared or removed */\n", " events.on('clear_output.CodeCell', handleClearOutput);\n", " events.on('delete.Cell', handleClearOutput);\n", "\n", " /* Handle when a new output is added */\n", " events.on('output_added.OutputArea', handleAddOutput);\n", "\n", " /**\n", " * Register the mime type and append_mime function with output_area\n", " */\n", " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", " /* Is output safe? */\n", " safe: true,\n", " /* Index of renderer in `output_area.display_order` */\n", " index: 0\n", " });\n", " }\n", "\n", " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", " if (root.Jupyter !== undefined) {\n", " var events = require('base/js/events');\n", " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", "\n", " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", " register_renderer(events, OutputArea);\n", " }\n", " }\n", "\n", " \n", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"

\\n\"+\n", " \"
    \\n\"+\n", " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded() {\n", " var el = document.getElementById(\"1123\");\n", " if (el != null) {\n", " el.textContent = \"BokehJS is loading...\";\n", " }\n", " if (root.Bokeh !== undefined) {\n", " if (el != null) {\n", " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", "\n", " function run_callbacks() {\n", " try {\n", " root._bokeh_onload_callbacks.forEach(function(callback) {\n", " if (callback != null)\n", " callback();\n", " });\n", " } finally {\n", " delete root._bokeh_onload_callbacks\n", " }\n", " console.debug(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(css_urls, js_urls, callback) {\n", " if (css_urls == null) css_urls = [];\n", " if (js_urls == null) js_urls = [];\n", "\n", " root._bokeh_onload_callbacks.push(callback);\n", " if (root._bokeh_is_loading > 0) {\n", " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", " return null;\n", " }\n", " if (js_urls == null || js_urls.length === 0) {\n", " run_callbacks();\n", " return null;\n", " }\n", " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", " root._bokeh_is_loading = css_urls.length + js_urls.length;\n", "\n", " function on_load() {\n", " root._bokeh_is_loading--;\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", " run_callbacks()\n", " }\n", " }\n", "\n", " function on_error() {\n", " console.error(\"failed to load \" + url);\n", " }\n", "\n", " for (var i = 0; i < css_urls.length; i++) {\n", " var url = css_urls[i];\n", " const element = document.createElement(\"link\");\n", " element.onload = on_load;\n", " element.onerror = on_error;\n", " element.rel = \"stylesheet\";\n", " element.type = \"text/css\";\n", " element.href = url;\n", " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", " document.body.appendChild(element);\n", " }\n", "\n", " for (var i = 0; i < js_urls.length; i++) {\n", " var url = js_urls[i];\n", " var element = document.createElement('script');\n", " element.onload = on_load;\n", " element.onerror = on_error;\n", " element.async = false;\n", " element.src = url;\n", " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", " document.head.appendChild(element);\n", " }\n", " };var element = document.getElementById(\"1123\");\n", " if (element == null) {\n", " console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1123' but no matching script tag was found. \")\n", " return false;\n", " }\n", "\n", " function inject_raw_css(css) {\n", " const element = document.createElement(\"style\");\n", " element.appendChild(document.createTextNode(css));\n", " document.body.appendChild(element);\n", " }\n", "\n", " \n", " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.4.0.min.js\"];\n", " var css_urls = [];\n", " \n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " Bokeh.set_log_level(\"info\");\n", " },\n", " function(Bokeh) {\n", " \n", " \n", " }\n", " ];\n", "\n", " function run_inline_js() {\n", " \n", " if (root.Bokeh !== undefined || force === true) {\n", " \n", " for (var i = 0; i < inline_js.length; i++) {\n", " inline_js[i].call(root, root.Bokeh);\n", " }\n", " if (force === true) {\n", " display_loaded();\n", " }} else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(run_inline_js, 100);\n", " } else if (!root._bokeh_failed_load) {\n", " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", " root._bokeh_failed_load = true;\n", " } else if (force !== true) {\n", " var cell = $(document.getElementById(\"1123\")).parents('.cell').data().cell;\n", " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", " }\n", "\n", " }\n", "\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", " run_inline_js();\n", " } else {\n", " load_libs(css_urls, js_urls, function() {\n", " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", " run_inline_js();\n", " });\n", " }\n", "}(window));" ], "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"1123\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };var element = document.getElementById(\"1123\");\n if (element == null) {\n console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1123' but no matching script tag was found. \")\n return false;\n }\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.4.0.min.js\"];\n var css_urls = [];\n \n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"1123\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " \n", " var docs_json = {\"cca711b8-4383-4db2-9851-64ce2e5940b3\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1135\",\"type\":\"LinearAxis\"}],\"center\":[{\"id\":\"1139\",\"type\":\"Grid\"},{\"id\":\"1144\",\"type\":\"Grid\"},{\"id\":\"1161\",\"type\":\"Slope\"}],\"left\":[{\"id\":\"1140\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"1165\",\"type\":\"GlyphRenderer\"}],\"right\":[{\"id\":\"1171\",\"type\":\"ColorBar\"}],\"title\":{\"id\":\"1125\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"1151\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"1127\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"1131\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"1129\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"1133\",\"type\":\"LinearScale\"}},\"id\":\"1124\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1145\",\"type\":\"PanTool\"},{\"id\":\"1146\",\"type\":\"WheelZoomTool\"},{\"id\":\"1147\",\"type\":\"BoxZoomTool\"},{\"id\":\"1148\",\"type\":\"SaveTool\"},{\"id\":\"1149\",\"type\":\"ResetTool\"},{\"id\":\"1150\",\"type\":\"HelpTool\"},{\"id\":\"1167\",\"type\":\"TapTool\"},{\"id\":\"1169\",\"type\":\"HoverTool\"}]},\"id\":\"1151\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1131\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"det-EL\",\"@{det-EL}\"],[\"small\",\"@{small}\"],[\"count\",\"@count\"]]},\"id\":\"1169\",\"type\":\"HoverTool\"},{\"attributes\":{\"callback\":null},\"id\":\"1129\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1145\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1183\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1146\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1191\",\"type\":\"BoxAnnotation\"}},\"id\":\"1147\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1185\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1148\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"field\":\"count\",\"transform\":{\"id\":\"1159\",\"type\":\"LinearColorMapper\"}},\"line_color\":{\"field\":\"count\",\"transform\":{\"id\":\"1159\",\"type\":\"LinearColorMapper\"}},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"det-EL\"},\"y\":{\"field\":\"small\"}},\"id\":\"1163\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1189\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1158\",\"type\":\"ColumnDataSource\"}},\"id\":\"1166\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1149\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1150\",\"type\":\"HelpTool\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"1158\",\"type\":\"ColumnDataSource\"}},\"code\":\"\\n // Select the data\\n var inds = source.selected.indices;\\n var data = source.data;\\n var x = data['det-EL'][inds];\\n var y = data['small'][inds];\\n\\n // Create the two commands\\n var fst_row = \\\"data = a.get_plot_data('det-EL','small',add_count=False)\\\";\\n var snd_row = \\\"data[(data['det-EL'] == \\\" + x + \\\") & (data['small'] == \\\" + y + \\\")]\\\";\\n\\n // Instructions\\n var instructions = \\\"Use the following code to list the formulas.\\\\n\\\";\\n instructions += \\\"Replace `a` with the ResAnalyzer` object:\\\\n\\\\n\\\"\\n alert(instructions + fst_row + \\\"\\\\n\\\" + snd_row);\\n \"},\"id\":\"1160\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1133\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1187\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis_label\":\"det-EL\",\"formatter\":{\"id\":\"1185\",\"type\":\"BasicTickFormatter\"},\"ticker\":{\"id\":\"1136\",\"type\":\"BasicTicker\"}},\"id\":\"1135\",\"type\":\"LinearAxis\"},{\"attributes\":{\"color_mapper\":{\"id\":\"1159\",\"type\":\"LinearColorMapper\"},\"formatter\":{\"id\":\"1187\",\"type\":\"BasicTickFormatter\"},\"location\":[0,0],\"ticker\":{\"id\":\"1188\",\"type\":\"BasicTicker\"},\"width\":16},\"id\":\"1171\",\"type\":\"ColorBar\"},{\"attributes\":{},\"id\":\"1141\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null},\"id\":\"1127\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1136\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":{\"id\":\"1160\",\"type\":\"CustomJS\"}},\"id\":\"1167\",\"type\":\"TapTool\"},{\"attributes\":{\"ticker\":{\"id\":\"1136\",\"type\":\"BasicTicker\"}},\"id\":\"1139\",\"type\":\"Grid\"},{\"attributes\":{\"dimension\":1,\"ticker\":{\"id\":\"1141\",\"type\":\"BasicTicker\"}},\"id\":\"1144\",\"type\":\"Grid\"},{\"attributes\":{\"high\":81,\"low\":1,\"palette\":[\"#000c7c\",\"#000c7e\",\"#000d80\",\"#000d82\",\"#000e83\",\"#000e85\",\"#000f87\",\"#000f89\",\"#00108b\",\"#00108c\",\"#00118e\",\"#001290\",\"#001292\",\"#001393\",\"#001395\",\"#001497\",\"#001598\",\"#00159a\",\"#00169c\",\"#00179d\",\"#00179f\",\"#0018a0\",\"#0019a2\",\"#001aa3\",\"#001aa5\",\"#001ba6\",\"#001ca8\",\"#001da9\",\"#001eab\",\"#001eac\",\"#001fad\",\"#0020af\",\"#0021b0\",\"#0022b1\",\"#0023b2\",\"#0024b3\",\"#0025b4\",\"#0026b5\",\"#0027b6\",\"#0028b7\",\"#0029b8\",\"#002ab8\",\"#002bb9\",\"#002cba\",\"#002eba\",\"#002fba\",\"#0030bb\",\"#0031bb\",\"#0033bb\",\"#0034bb\",\"#0035bb\",\"#0036bb\",\"#0037bb\",\"#0039bb\",\"#003abb\",\"#003bbb\",\"#003cbb\",\"#003dbb\",\"#003fba\",\"#0040ba\",\"#0041ba\",\"#0042b9\",\"#0043b9\",\"#0045b8\",\"#0046b8\",\"#0047b7\",\"#0048b6\",\"#0049b6\",\"#004ab5\",\"#004cb4\",\"#004db3\",\"#004eb2\",\"#004fb2\",\"#0050b1\",\"#0052b0\",\"#0053ae\",\"#0054ad\",\"#0055ac\",\"#0056ab\",\"#0057aa\",\"#0059a9\",\"#005aa8\",\"#005ba7\",\"#005ca5\",\"#005da4\",\"#005fa3\",\"#0060a2\",\"#0061a1\",\"#0062a0\",\"#00639e\",\"#00649d\",\"#00659c\",\"#00679b\",\"#00689a\",\"#006998\",\"#006a97\",\"#006b96\",\"#006c95\",\"#006d93\",\"#006f92\",\"#007091\",\"#00718f\",\"#00728e\",\"#00738d\",\"#00748b\",\"#00758a\",\"#007689\",\"#007887\",\"#007986\",\"#007a84\",\"#007b83\",\"#007c81\",\"#007d80\",\"#007e7e\",\"#007f7d\",\"#00807b\",\"#008279\",\"#008377\",\"#008476\",\"#028574\",\"#068672\",\"#098770\",\"#0d886e\",\"#10896c\",\"#128a6a\",\"#158b68\",\"#178c66\",\"#198d63\",\"#1b8e61\",\"#1d905f\",\"#1f915c\",\"#20925a\",\"#229358\",\"#239455\",\"#259552\",\"#269650\",\"#28974d\",\"#29984a\",\"#2a9948\",\"#2b9a45\",\"#2c9b43\",\"#2c9c40\",\"#2d9d3e\",\"#2d9e3b\",\"#2e9f39\",\"#2ea037\",\"#2fa135\",\"#2fa232\",\"#2fa330\",\"#30a52e\",\"#30a62c\",\"#30a72a\",\"#30a828\",\"#30a926\",\"#31aa25\",\"#31ab23\",\"#31ac21\",\"#31ad20\",\"#31ae1f\",\"#31af1d\",\"#31b01c\",\"#31b11b\",\"#31b21a\",\"#32b31a\",\"#32b41a\",\"#32b519\",\"#32b619\",\"#32b719\",\"#32b819\",\"#32b919\",\"#32ba19\",\"#32bb19\",\"#33bc19\",\"#33bd19\",\"#33be19\",\"#33bf19\",\"#33c019\",\"#33c119\",\"#33c219\",\"#33c319\",\"#34c519\",\"#34c619\",\"#34c719\",\"#34c819\",\"#34c919\",\"#34ca19\",\"#35cb19\",\"#35cc19\",\"#35cd19\",\"#35ce19\",\"#35cf19\",\"#35d019\",\"#36d119\",\"#36d219\",\"#36d319\",\"#36d419\",\"#37d519\",\"#38d619\",\"#3bd719\",\"#3dd819\",\"#40d919\",\"#44da19\",\"#47da19\",\"#4bdb19\",\"#4fdc1a\",\"#53dd1a\",\"#57de1a\",\"#5ade1a\",\"#5edf1a\",\"#62e01a\",\"#66e01a\",\"#6ae11a\",\"#6ee21a\",\"#72e21a\",\"#76e31a\",\"#7ae31b\",\"#7ee41b\",\"#82e51b\",\"#86e51b\",\"#8ae61b\",\"#8ee61b\",\"#91e71b\",\"#95e71b\",\"#99e81c\",\"#9de81c\",\"#a1e91c\",\"#a4e91c\",\"#a8ea1c\",\"#acea1c\",\"#b0ea1c\",\"#b3eb1d\",\"#b7eb1d\",\"#bbec1d\",\"#beec1d\",\"#c2ec1d\",\"#c6ed1e\",\"#c9ed1e\",\"#cded1e\",\"#d1ee1e\",\"#d4ee1e\",\"#d8ee1f\",\"#dcee1f\",\"#dfef1f\",\"#e3ef1f\",\"#e7ef20\",\"#eaef20\",\"#eef020\",\"#f2f020\",\"#f5f021\",\"#f9f021\",\"#fcf021\",\"#fff021\",\"#fff022\",\"#fff122\",\"#fff122\",\"#fff123\"]},\"id\":\"1159\",\"type\":\"LinearColorMapper\"},{\"attributes\":{\"axis_label\":\"small\",\"formatter\":{\"id\":\"1183\",\"type\":\"BasicTickFormatter\"},\"ticker\":{\"id\":\"1141\",\"type\":\"BasicTicker\"}},\"id\":\"1140\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1190\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"det-EL\"},\"y\":{\"field\":\"small\"}},\"id\":\"1164\",\"type\":\"Scatter\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1191\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"gradient\":1,\"line_color\":{\"value\":\"orange\"},\"line_dash\":[6],\"line_width\":{\"value\":2},\"y_intercept\":0},\"id\":\"1161\",\"type\":\"Slope\"},{\"attributes\":{\"data_source\":{\"id\":\"1158\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1163\",\"type\":\"Scatter\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1164\",\"type\":\"Scatter\"},\"selection_glyph\":null,\"view\":{\"id\":\"1166\",\"type\":\"CDSView\"}},\"id\":\"1165\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1188\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text\":\"Numbers of states\"},\"id\":\"1125\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"data\":{\"count\":[70,14,2,63,12,2,81,12,3,5,56,5,2,1,1,1,10,31,1,1,7,22,5,1,4,2,5,4,2,1,1,1,2,4,8,2,3,5,3,3,1,1,1,3,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\"det-EL\":[1,1,1,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,7,8,8,8,8,8,9,9,9,9,10,10,10,10,10,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,14,14,15,15,16,17,18,18,19,20,20,21,21,22,26,30,49],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76],\"small\":[1,2,3,2,3,2,3,4,5,3,4,5,6,7,2,3,4,5,3,4,5,6,7,8,4,5,6,7,8,10,11,5,6,7,8,9,6,7,8,9,5,6,7,10,11,7,8,10,11,12,7,8,9,10,12,13,6,11,13,16,8,16,7,12,16,14,7,18,16,4,8,21,29,10,6,7,10]},\"selected\":{\"id\":\"1189\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1190\",\"type\":\"UnionRenderers\"}},\"id\":\"1158\",\"type\":\"ColumnDataSource\"}],\"root_ids\":[\"1124\"]},\"title\":\"Bokeh Application\",\"version\":\"1.4.0\"}};\n", " var render_items = [{\"docid\":\"cca711b8-4383-4db2-9851-64ce2e5940b3\",\"roots\":{\"1124\":\"b4e8f48a-7365-40d1-9423-5dba370b0ce6\"}}];\n", " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", "\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " var attempts = 0;\n", " var timer = setInterval(function(root) {\n", " if (root.Bokeh !== undefined) {\n", " clearInterval(timer);\n", " embed_document(root);\n", " } else {\n", " attempts++;\n", " if (attempts > 100) {\n", " clearInterval(timer);\n", " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n", " }\n", " }\n", " }, 10, root)\n", " }\n", "})(window);" ], "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "1124" } }, "output_type": "display_data" }, { "data": { "text/html": [ "
Figure(
id = '1124', …)
above = [],
align = 'start',
aspect_ratio = None,
aspect_scale = 1,
background = None,
background_fill_alpha = {'value': 1.0},
background_fill_color = {'value': '#ffffff'},
below = [LinearAxis(id='1135', ...)],
border_fill_alpha = {'value': 1.0},
border_fill_color = {'value': '#ffffff'},
center = [Grid(id='1139', ...), Grid(id='1144', ...), Slope(id='1161', ...)],
css_classes = [],
disabled = False,
extra_x_ranges = {},
extra_y_ranges = {},
frame_height = None,
frame_width = None,
height = None,
height_policy = 'auto',
hidpi = True,
js_event_callbacks = {},
js_property_callbacks = {},
left = [LinearAxis(id='1140', ...)],
lod_factor = 10,
lod_interval = 300,
lod_threshold = 2000,
lod_timeout = 500,
margin = (0, 0, 0, 0),
match_aspect = False,
max_height = None,
max_width = None,
min_border = 5,
min_border_bottom = None,
min_border_left = None,
min_border_right = None,
min_border_top = None,
min_height = None,
min_width = None,
name = None,
outline_line_alpha = {'value': 1.0},
outline_line_cap = 'butt',
outline_line_color = {'value': '#e5e5e5'},
outline_line_dash = [],
outline_line_dash_offset = 0,
outline_line_join = 'bevel',
outline_line_width = {'value': 1},
output_backend = 'canvas',
plot_height = 600,
plot_width = 600,
renderers = [GlyphRenderer(id='1165', ...)],
reset_policy = 'standard',
right = [ColorBar(id='1171', ...)],
sizing_mode = None,
subscribed_events = [],
tags = [],
title = Title(id='1125', ...),
title_location = 'above',
toolbar = Toolbar(id='1151', ...),
toolbar_location = 'right',
toolbar_sticky = True,
visible = True,
width = None,
width_policy = 'auto',
x_range = DataRange1d(id='1127', ...),
x_scale = LinearScale(id='1131', ...),
y_range = DataRange1d(id='1129', ...),
y_scale = LinearScale(id='1133', ...))
\n", "\n" ], "text/plain": [ "Figure(id='1124', ...)" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.bokeh_scatter_plot(\"det-EL\",\"small\",include_equal=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you don't like colors, you can choose to use a single mark for a single formula (with transparency). You can tweek the transparency using the alpha argument. Click on a dot to see all the formulas hiden there." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " Loading BokehJS ...\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n", " root._bokeh_onload_callbacks = [];\n", " root._bokeh_is_loading = undefined;\n", " }\n", "\n", " var JS_MIME_TYPE = 'application/javascript';\n", " var HTML_MIME_TYPE = 'text/html';\n", " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " var CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " var script = document.createElement(\"script\");\n", " node.appendChild(script);\n", " }\n", "\n", " /**\n", " * Handle when an output is cleared or removed\n", " */\n", " function handleClearOutput(event, handle) {\n", " var cell = handle.cell;\n", "\n", " var id = cell.output_area._bokeh_element_id;\n", " var server_id = cell.output_area._bokeh_server_id;\n", " // Clean up Bokeh references\n", " if (id != null && id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", " cell.notebook.kernel.execute(cmd, {\n", " iopub: {\n", " output: function(msg) {\n", " var id = msg.content.text.trim();\n", " if (id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " var output_area = handle.output_area;\n", " var output = handle.output;\n", "\n", " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", " return\n", " }\n", "\n", " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", "\n", " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", " // store reference to embed id on output_area\n", " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", " }\n", " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", " var bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " var script_attrs = bk_div.children[0].attributes;\n", " for (var i = 0; i < script_attrs.length; i++) {\n", " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", " }\n", " // store reference to server id on output_area\n", " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", " }\n", " }\n", "\n", " function register_renderer(events, OutputArea) {\n", "\n", " function append_mime(data, metadata, element) {\n", " // create a DOM node to render to\n", " var toinsert = this.create_output_subarea(\n", " metadata,\n", " CLASS_NAME,\n", " EXEC_MIME_TYPE\n", " );\n", " this.keyboard_manager.register_events(toinsert);\n", " // Render to node\n", " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", " render(props, toinsert[toinsert.length - 1]);\n", " element.append(toinsert);\n", " return toinsert\n", " }\n", "\n", " /* Handle when an output is cleared or removed */\n", " events.on('clear_output.CodeCell', handleClearOutput);\n", " events.on('delete.Cell', handleClearOutput);\n", "\n", " /* Handle when a new output is added */\n", " events.on('output_added.OutputArea', handleAddOutput);\n", "\n", " /**\n", " * Register the mime type and append_mime function with output_area\n", " */\n", " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", " /* Is output safe? */\n", " safe: true,\n", " /* Index of renderer in `output_area.display_order` */\n", " index: 0\n", " });\n", " }\n", "\n", " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", " if (root.Jupyter !== undefined) {\n", " var events = require('base/js/events');\n", " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", "\n", " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", " register_renderer(events, OutputArea);\n", " }\n", " }\n", "\n", " \n", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"

\\n\"+\n", " \"
    \\n\"+\n", " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded() {\n", " var el = document.getElementById(\"1255\");\n", " if (el != null) {\n", " el.textContent = \"BokehJS is loading...\";\n", " }\n", " if (root.Bokeh !== undefined) {\n", " if (el != null) {\n", " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", "\n", " function run_callbacks() {\n", " try {\n", " root._bokeh_onload_callbacks.forEach(function(callback) {\n", " if (callback != null)\n", " callback();\n", " });\n", " } finally {\n", " delete root._bokeh_onload_callbacks\n", " }\n", " console.debug(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(css_urls, js_urls, callback) {\n", " if (css_urls == null) css_urls = [];\n", " if (js_urls == null) js_urls = [];\n", "\n", " root._bokeh_onload_callbacks.push(callback);\n", " if (root._bokeh_is_loading > 0) {\n", " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", " return null;\n", " }\n", " if (js_urls == null || js_urls.length === 0) {\n", " run_callbacks();\n", " return null;\n", " }\n", " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", " root._bokeh_is_loading = css_urls.length + js_urls.length;\n", "\n", " function on_load() {\n", " root._bokeh_is_loading--;\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", " run_callbacks()\n", " }\n", " }\n", "\n", " function on_error() {\n", " console.error(\"failed to load \" + url);\n", " }\n", "\n", " for (var i = 0; i < css_urls.length; i++) {\n", " var url = css_urls[i];\n", " const element = document.createElement(\"link\");\n", " element.onload = on_load;\n", " element.onerror = on_error;\n", " element.rel = \"stylesheet\";\n", " element.type = \"text/css\";\n", " element.href = url;\n", " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", " document.body.appendChild(element);\n", " }\n", "\n", " for (var i = 0; i < js_urls.length; i++) {\n", " var url = js_urls[i];\n", " var element = document.createElement('script');\n", " element.onload = on_load;\n", " element.onerror = on_error;\n", " element.async = false;\n", " element.src = url;\n", " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", " document.head.appendChild(element);\n", " }\n", " };var element = document.getElementById(\"1255\");\n", " if (element == null) {\n", " console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1255' but no matching script tag was found. \")\n", " return false;\n", " }\n", "\n", " function inject_raw_css(css) {\n", " const element = document.createElement(\"style\");\n", " element.appendChild(document.createTextNode(css));\n", " document.body.appendChild(element);\n", " }\n", "\n", " \n", " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.4.0.min.js\"];\n", " var css_urls = [];\n", " \n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " Bokeh.set_log_level(\"info\");\n", " },\n", " function(Bokeh) {\n", " \n", " \n", " }\n", " ];\n", "\n", " function run_inline_js() {\n", " \n", " if (root.Bokeh !== undefined || force === true) {\n", " \n", " for (var i = 0; i < inline_js.length; i++) {\n", " inline_js[i].call(root, root.Bokeh);\n", " }\n", " if (force === true) {\n", " display_loaded();\n", " }} else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(run_inline_js, 100);\n", " } else if (!root._bokeh_failed_load) {\n", " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", " root._bokeh_failed_load = true;\n", " } else if (force !== true) {\n", " var cell = $(document.getElementById(\"1255\")).parents('.cell').data().cell;\n", " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", " }\n", "\n", " }\n", "\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", " run_inline_js();\n", " } else {\n", " load_libs(css_urls, js_urls, function() {\n", " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", " run_inline_js();\n", " });\n", " }\n", "}(window));" ], "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"1255\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };var element = document.getElementById(\"1255\");\n if (element == null) {\n console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1255' but no matching script tag was found. \")\n return false;\n }\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.4.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.4.0.min.js\"];\n var css_urls = [];\n \n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"1255\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " \n", " var docs_json = {\"31ff4db3-6d7e-4ec2-986f-f7589d4d12b0\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1267\",\"type\":\"LinearAxis\"}],\"center\":[{\"id\":\"1271\",\"type\":\"Grid\"},{\"id\":\"1276\",\"type\":\"Grid\"},{\"id\":\"1292\",\"type\":\"Slope\"}],\"left\":[{\"id\":\"1272\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"1296\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"1257\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"1283\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"1259\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"1263\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"1261\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"1265\",\"type\":\"LinearScale\"}},\"id\":\"1256\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"dimension\":1,\"ticker\":{\"id\":\"1273\",\"type\":\"BasicTicker\"}},\"id\":\"1276\",\"type\":\"Grid\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"1290\",\"type\":\"ColumnDataSource\"}},\"code\":\"\\n // Select the data\\n var inds = source.selected.indices;\\n var data = source.data;\\n\\n // Print formulas ids\\n var output = data['form_id'][inds[0]];\\n for (var i = 1; i < inds.length; i++) {\\n var f = data['form_id'][inds[i]];\\n output += ', ' + f;\\n }\\n output += '\\\\n'\\n\\n // Print formulas (1 per line)\\n for (var i = 0; i < inds.length; i++) {\\n var f = data['formula'][inds[i]];\\n output += f + '\\\\n';\\n }\\n alert(output);\\n \"},\"id\":\"1291\",\"type\":\"CustomJS\"},{\"attributes\":{\"data_source\":{\"id\":\"1290\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1294\",\"type\":\"Scatter\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1295\",\"type\":\"Scatter\"},\"selection_glyph\":null,\"view\":{\"id\":\"1297\",\"type\":\"CDSView\"}},\"id\":\"1296\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1323\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1282\",\"type\":\"HelpTool\"},{\"attributes\":{\"ticker\":{\"id\":\"1268\",\"type\":\"BasicTicker\"}},\"id\":\"1271\",\"type\":\"Grid\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1277\",\"type\":\"PanTool\"},{\"id\":\"1278\",\"type\":\"WheelZoomTool\"},{\"id\":\"1279\",\"type\":\"BoxZoomTool\"},{\"id\":\"1280\",\"type\":\"SaveTool\"},{\"id\":\"1281\",\"type\":\"ResetTool\"},{\"id\":\"1282\",\"type\":\"HelpTool\"},{\"id\":\"1298\",\"type\":\"TapTool\"},{\"id\":\"1300\",\"type\":\"HoverTool\"}]},\"id\":\"1283\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1268\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"det-EL\"},\"y\":{\"field\":\"small\"}},\"id\":\"1295\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1327\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1265\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1273\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1325\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis_label\":\"det-EL\",\"formatter\":{\"id\":\"1325\",\"type\":\"BasicTickFormatter\"},\"ticker\":{\"id\":\"1268\",\"type\":\"BasicTicker\"}},\"id\":\"1267\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1328\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":10},\"x\":{\"field\":\"det-EL\"},\"y\":{\"field\":\"small\"}},\"id\":\"1294\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1280\",\"type\":\"SaveTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1329\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"callback\":null},\"id\":\"1261\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"1329\",\"type\":\"BoxAnnotation\"}},\"id\":\"1279\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"callback\":null},\"id\":\"1259\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1281\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1263\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1278\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"1290\",\"type\":\"ColumnDataSource\"}},\"id\":\"1297\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1277\",\"type\":\"PanTool\"},{\"attributes\":{\"axis_label\":\"small\",\"formatter\":{\"id\":\"1323\",\"type\":\"BasicTickFormatter\"},\"ticker\":{\"id\":\"1273\",\"type\":\"BasicTicker\"}},\"id\":\"1272\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"det-EL\",\"@{det-EL}\"],[\"small\",\"@{small}\"],[\"formula id\",\"@form_id\"]]},\"id\":\"1300\",\"type\":\"HoverTool\"},{\"attributes\":{\"gradient\":1,\"line_color\":{\"value\":\"orange\"},\"line_dash\":[6],\"line_width\":{\"value\":2},\"y_intercept\":0},\"id\":\"1292\",\"type\":\"Slope\"},{\"attributes\":{\"text\":\"Numbers of states\"},\"id\":\"1257\",\"type\":\"Title\"},{\"attributes\":{\"callback\":{\"id\":\"1291\",\"type\":\"CustomJS\"}},\"id\":\"1298\",\"type\":\"TapTool\"},{\"attributes\":{\"callback\":null,\"data\":{\"det-EL\":[11,2,4,10,21,7,8,15,13,11,9,9,2,6,7,4,6,5,26,1,18,5,13,20,10,12,5,3,8,3,3,6,3,6,1,9,12,1,2,11,9,8,14,11,3,2,9,7,2,5,5,3,3,7,3,8,3,2,1,9,30,4,8,10,4,4,2,3,8,3,1,3,6,22,13,8,7,8,6,14,7,6,5,1,9,2,9,4,4,2,1,6,6,4,2,5,4,6,5,6,3,1,5,15,6,12,6,7,1,9,7,4,4,2,49,17,1,5,19,6,3,1,3,7,7,8,9,12,10,4,4,1,1,7,20,1,1,7,7,12,5,6,7,1,9,2,3,7,14,5,3],\"form_id\":[0,3,4,8,10,13,16,24,25,26,28,33,34,39,44,46,47,49,51,52,56,63,72,82,84,90,95,97,100,105,107,109,113,115,116,117,124,126,128,132,149,151,152,157,159,161,162,164,165,166,171,176,177,180,184,185,186,188,191,193,194,195,196,198,203,206,212,223,225,229,231,234,238,246,250,255,260,266,267,269,273,275,276,284,288,290,291,292,295,296,298,301,303,306,312,313,318,319,322,325,337,340,341,343,345,346,347,353,359,360,367,368,370,374,378,379,380,381,382,389,392,393,398,399,400,406,407,415,417,419,420,434,438,440,441,450,451,454,455,458,467,475,476,478,481,484,488,489,492,498,499],\"formula\":[\"Xp1 R ((Gp1 R p2) W p3)\",\"F(p0 R p1)\",\"G(p1 | Fp1) W (FGp2 R !p2)\",\"XXG((Xp1 R (p0 W p3)) -> (p2 R GXp0))\",\"X((Fp2 W Xp0) <-> (p2 <-> (p1 U Fp3)))\",\"(X!p0 -> G(Gp1 | Xp2)) W p2\",\"(p0 U (0 R p2)) R (p0 R Xp1)\",\"F(!p2 <-> F(Fp1 R p3))\",\"FXX((Xp0 xor (p2 U Gp0)) R !p0)\",\"X(p0 | Xp1) | (!X!p2 M (p0 M p3))\",\"X(!p3 <-> (!p1 U F(Fp2 <-> Gp3)))\",\"G((1 U Gp0) U ((p2 | Gp3) R p3)) W p0\",\"F(!p1 | GXp2)\",\"Xp3 R (p2 <-> (1 U Xp1))\",\"F!(p1 xor GFp2)\",\"0 R ((p2 xor Gp1) -> (p0 U Fp2))\",\"Xp1 | (p3 & ((p1 M (Fp1 W 0)) U X!p0))\",\"X(p2 U GFp0) R XXp3\",\"((p1 M !p0) U Xp2) W G!p2\",\"!G(1 U p1)\",\"p3 W (p0 xor (!Gp1 -> Gp2))\",\"p2 R (!XGF(p0 | (0 R p3)) R !p0)\",\"!G(!p1 -> XX(p0 xor !Xp1))\",\"(p2 W (Gp1 | Gp3)) W (X!p0 xor XXp2)\",\"p1 M (Fp2 W (Xp0 & !GXp0))\",\"F(G(p1 M p2) xor !(X(Xp0 | Gp3) W p2))\",\"(Fp3 xor Xp0) W 0\",\"G((Gp2 | Gp3) U Gp2)\",\"G(Gp2 <-> ((p2 | (p3 M Xp1)) W 0))\",\"(p1 -> p0) | !(XXG!G(p0 & p1) W p3)\",\"F(p3 U (Fp3 R (!p2 -> G(p1 U Fp2))))\",\"(p2 U p1) xor GXG(p1 -> Fp2)\",\"G!p3 M (p2 | p3)\",\"Gp3 -> G(Gp0 W Xp1)\",\"FGp3\",\"F(F(p1 -> G!p0) <-> (Xp1 U p3))\",\"F((Gp1 M (p1 xor p3)) xor G(GXFp1 R p0))\",\"F(0 R (p1 & (p0 <-> p2)))\",\"XFGp2 W Fp0\",\"!X(((p2 -> p0) M p2) R XXp2)\",\"p2 <-> ((Xp3 W 0) | (p3 <-> FXGp2))\",\"(p1 xor p2) xor ((p0 xor p1) R (p3 | Fp1))\",\"!((Fp1 M F(!p0 R Xp2)) xor (p1 <-> Xp1))\",\"(p3 W Gp3) <-> (!p3 W (Xp1 R Fp0))\",\"Gp3 -> ((p0 xor p2) | F(p2 -> Gp0))\",\"G((p0 | Gp2) M F(Xp0 W Gp2))\",\"G(p0 | p3) | XXXp1\",\"G((((p1 R p3) M Fp3) R X(p1 & p2)) U p1)\",\"F((!p1 & !(p1 xor p3)) W (p2 | p3))\",\"(p0 | Fp1) -> X(p0 W p3)\",\"!((((p2 | p3) <-> (1 U p1)) -> (p0 <-> p3)) M Fp2)\",\"Fp3 xor F!FG(Xp2 <-> (!p1 <-> Xp2))\",\"(p1 xor p2) M F(p0 W p1)\",\"(p1 M 1) & FXX(p2 -> XXG(p0 W p1))\",\"!(F!Xp3 W Fp2) & X(p3 <-> Fp2)\",\"p1 <-> FG((p0 M (p1 | Gp1)) -> Fp3)\",\"GX(XGF!p0 W p3)\",\"F(Fp1 | Gp0 | (1 U p3))\",\"F!FX(Gp2 -> Fp3)\",\"Fp3 U (p0 <-> Xp2)\",\"GF((p3 M (X(p1 M p3) <-> XGp2)) M Fp3)\",\"(!(Fp2 W p2) -> Gp3) W F!(p0 W 0)\",\"Fp1 R (Gp0 xor GF(p1 U !p2))\",\"G((Xp1 & Gp0) xor X!Gp1)\",\"!(G(!p0 U ((0 R p1) W p0)) | (p3 <-> Fp1))\",\"GXF!p2 -> Xp1\",\"G!p0 | (Xp2 W X(0 R Fp2))\",\"F(p3 W Xp2)\",\"(XXp2 M p0) & (p2 M p1)\",\"G((!p2 M F(p1 M GXp1)) W (!p1 M p2))\",\"FGp0\",\"XF(p2 M FGXX(p0 <-> p2))\",\"XXX(p3 <-> (!p1 xor p2)) -> FGp2\",\"(p2 -> GFp1) U ((Gp3 R p2) W Gp0)\",\"(p2 U p1) <-> (p0 xor ((p2 <-> (!p1 R Gp0)) M 1))\",\"X(X(Gp1 R (p0 <-> p3)) & F(Xp1 U p0))\",\"!p3 U F(!p1 <-> !FX(Fp3 R Gp3))\",\"F(X(Fp3 M p2) <-> !G(p2 <-> p3))\",\"!p0 W ((p1 <-> (!p2 & (p1 M 1))) W (p3 M p0))\",\"!p0 U G((p1 R Xp3) U ((p1 R p2) W Gp1))\",\"G(!(Fp0 M G(p3 | Fp1)) W !Xp1)\",\"!p1 M (!(Xp0 R p2) | F(p1 W p3))\",\"F(((p0 & G(1 U (p1 xor (p0 xor p2)))) R p1) M 1)\",\"(p3 U XGp3) M 1\",\"(Xp2 xor GXp1) M (p0 R p2)\",\"G(XGFGp0 -> p1)\",\"!XXp2 M (p1 | (p0 W p3))\",\"X(G!p1 R p0)\",\"F(p2 W p1) | !XFp2\",\"F(Gp3 W (p0 & !p0 & Gp2)) M !p3\",\"GF!X(XXFp1 | ((!p0 <-> p1) W p1))\",\"X!(Xp3 & (p0 U !(p0 | (p2 -> p0))))\",\"((!(p1 <-> Gp1) U Fp0) -> p1) W Xp1\",\"!(p1 M GXGp0)\",\"F((1 U Gp1) W p2)\",\"!((p3 & (p2 | Xp1)) M (X(p0 | p2) M Xp0))\",\"Gp2 R (Gp1 -> p0)\",\"(((p1 | Gp0) W p1) R !p3) | G(p0 & p2)\",\"!(G(p2 & Fp1) R F((Xp0 U p2) W Gp3))\",\"(p2 & Xp3) <-> (p1 & Fp3)\",\"Gp2 M (p0 xor p2)\",\"(p3 U Fp0) W FGXp2\",\"Gp2 | Xp0\",\"((p2 & p3) <-> (p0 R ((p3 <-> Gp0) U Xp1))) -> p2\",\"XX((p3 R Xp1) -> !Fp3)\",\"p1 M ((GFp1 -> Gp3) M (F!p0 M Fp0))\",\"!(((p1 | p3) R p2) & X!(p3 & Gp0))\",\"F((0 R p2) xor (p1 <-> !(p1 xor F(Xp0 M p0))))\",\"FX(Gp1 xor !(p3 U (!p3 | Xp3)))\",\"(p0 U p3) -> ((Fp2 | (p2 W 0)) M Xp1)\",\"G((p3 R !(p2 & Xp2)) <-> (Fp3 | XFp3))\",\"F!F!p0 | (Fp3 W (p2 & Fp2))\",\"G((p1 U p3) -> Fp2)\",\"F(F(p3 <-> Xp3) <-> (!p2 & !(1 U !p2)))\",\"XG(!((p2 <-> Gp3) M p0) -> !Gp1)\",\"!(p0 U !p3) R (p2 <-> ((!p3 | Gp0) R p3))\",\"GXF(Xp0 & XXFGp2)\",\"!((p2 R p1) W (p3 R p0))\",\"((p1 U p3) xor (p1 U Gp0)) W !X!p0\",\"FGp1 U (p0 & (Xp3 M p3))\",\"Gp2 xor (GXp1 M 1)\",\"!GFp3\",\"(p2 R Fp1) M ((Gp1 M GXp2) R p1)\",\"p1 W (p2 xor ((p3 W p2) | GXFXp0))\",\"F(!p3 xor G((p2 & Fp2) | F(Xp2 U p2)))\",\"(XFGp2 xor (p2 & Fp3)) xor (p1 | (p3 R p2))\",\"F(p2 <-> ((Xp0 W p1) <-> (p0 <-> (p0 W 0))))\",\"p2 -> F(Fp2 <-> X((p0 W Gp2) W p1))\",\"GX(!F(p0 xor Fp1) W (p0 R Xp3))\",\"X(1 U (X!p2 | ((p2 -> p0) R Gp1)))\",\"!(G(X(!p1 R p0) M (p2 <-> !p3)) W Gp1)\",\"F((Xp0 R p1) U G!p3) M GFp0\",\"!G(p0 M 1)\",\"X((0 R !p0) xor F(Xp2 R !p1))\",\"GF(p1 <-> ((p2 -> Gp3) R Fp3))\",\"GF((F!Gp0 W !Fp0) W p1)\",\"(0 R Xp1) M 1\",\"(Xp0 xor (G!p0 R (p1 | (p0 <-> p2)))) W Fp3\",\"X((Gp1 W p3) | G(Gp1 U p2))\",\"!(Xp1 xor ((!p1 R Xp3) R (p1 M 1)))\",\"XXp2 R (p0 & p3)\",\"((p3 U (XGp1 U p1)) W 0) R !p0\",\"Fp2 M (Xp2 | (p1 <-> ((p2 | p3) W p1)))\",\"FG(XFp1 | (Fp3 -> !p3))\",\"(Gp0 R p3) <-> (!p2 U p0)\",\"F!(!p0 M Fp0)\",\"G(Xp0 M 1) -> p0\",\"((p3 | (p1 U p0)) -> p3) M Xp1\",\"(!Fp1 R (Fp3 xor Gp2)) M Fp2\",\"(p2 -> Xp2) -> Gp0\",\"F((Xp0 W Gp1) | F!(!p1 xor p3))\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],\"small\":[10,3,5,6,29,5,5,7,11,8,8,7,3,8,4,3,7,4,6,2,7,4,6,8,11,7,4,4,9,4,5,7,2,5,2,6,8,2,3,7,7,7,16,12,4,3,6,6,3,4,4,5,4,8,4,7,4,3,2,8,7,5,7,5,6,5,3,4,6,4,2,4,7,10,16,6,4,7,5,8,5,7,3,2,7,3,7,3,5,3,2,5,4,3,3,4,3,5,2,5,2,3,4,12,5,9,5,8,2,6,6,7,3,3,10,14,2,4,16,7,5,2,4,4,4,9,7,10,7,5,6,2,2,10,4,2,2,11,6,13,4,3,6,3,8,3,4,6,8,4,4]},\"selected\":{\"id\":\"1327\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1328\",\"type\":\"UnionRenderers\"}},\"id\":\"1290\",\"type\":\"ColumnDataSource\"}],\"root_ids\":[\"1256\"]},\"title\":\"Bokeh Application\",\"version\":\"1.4.0\"}};\n", " var render_items = [{\"docid\":\"31ff4db3-6d7e-4ec2-986f-f7589d4d12b0\",\"roots\":{\"1256\":\"98ec83ee-8cea-4d2f-9682-4c910f132f04\"}}];\n", " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", "\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " var attempts = 0;\n", " var timer = setInterval(function(root) {\n", " if (root.Bokeh !== undefined) {\n", " clearInterval(timer);\n", " embed_document(root);\n", " } else {\n", " attempts++;\n", " if (attempts > 100) {\n", " clearInterval(timer);\n", " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n", " }\n", " }\n", " }, 10, root)\n", " }\n", "})(window);" ], "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "1256" } }, "output_type": "display_data" }, { "data": { "text/html": [ "
Figure(
id = '1256', …)
above = [],
align = 'start',
aspect_ratio = None,
aspect_scale = 1,
background = None,
background_fill_alpha = {'value': 1.0},
background_fill_color = {'value': '#ffffff'},
below = [LinearAxis(id='1267', ...)],
border_fill_alpha = {'value': 1.0},
border_fill_color = {'value': '#ffffff'},
center = [Grid(id='1271', ...), Grid(id='1276', ...), Slope(id='1292', ...)],
css_classes = [],
disabled = False,
extra_x_ranges = {},
extra_y_ranges = {},
frame_height = None,
frame_width = None,
height = None,
height_policy = 'auto',
hidpi = True,
js_event_callbacks = {},
js_property_callbacks = {},
left = [LinearAxis(id='1272', ...)],
lod_factor = 10,
lod_interval = 300,
lod_threshold = 2000,
lod_timeout = 500,
margin = (0, 0, 0, 0),
match_aspect = False,
max_height = None,
max_width = None,
min_border = 5,
min_border_bottom = None,
min_border_left = None,
min_border_right = None,
min_border_top = None,
min_height = None,
min_width = None,
name = None,
outline_line_alpha = {'value': 1.0},
outline_line_cap = 'butt',
outline_line_color = {'value': '#e5e5e5'},
outline_line_dash = [],
outline_line_dash_offset = 0,
outline_line_join = 'bevel',
outline_line_width = {'value': 1},
output_backend = 'canvas',
plot_height = 600,
plot_width = 600,
renderers = [GlyphRenderer(id='1296', ...)],
reset_policy = 'standard',
right = [],
sizing_mode = None,
subscribed_events = [],
tags = [],
title = Title(id='1257', ...),
title_location = 'above',
toolbar = Toolbar(id='1283', ...),
toolbar_location = 'right',
toolbar_sticky = True,
visible = True,
width = None,
width_policy = 'auto',
x_range = DataRange1d(id='1259', ...),
x_scale = LinearScale(id='1263', ...),
y_range = DataRange1d(id='1261', ...),
y_scale = LinearScale(id='1265', ...))
\n", "\n" ], "text/plain": [ "Figure(id='1256', ...)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.bokeh_scatter_plot(\"det-EL\",\"small\",merge_same=False, alpha=.1)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
timeoutcrash
tool
det-EL00
det-TGBA00
small00
\n", "
" ], "text/plain": [ " timeout crash\n", "tool \n", "det-EL 0 0\n", "det-TGBA 0 0\n", "small 0 0" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.get_error_counts(drop_zeros=False, error_types=[\"timeout\", \"crash\"])" ] } ], "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" } }, "nbformat": 4, "nbformat_minor": 4 }