(function() {
  var fn = function() {
    
    (function(root) {
      function now() {
        return new Date();
      }
    
      var force = false;
    
      if (typeof (root._bokeh_onload_callbacks) === "undefined" || force === true) {
        root._bokeh_onload_callbacks = [];
        root._bokeh_is_loading = undefined;
      }
    
      
      
    
      
      
    
      function run_callbacks() {
        try {
          root._bokeh_onload_callbacks.forEach(function(callback) { callback() });
        }
        finally {
          delete root._bokeh_onload_callbacks
        }
        console.info("Bokeh: all callbacks have finished");
      }
    
      function load_libs(js_urls, callback) {
        root._bokeh_onload_callbacks.push(callback);
        if (root._bokeh_is_loading > 0) {
          console.log("Bokeh: BokehJS is being loaded, scheduling callback at", now());
          return null;
        }
        if (js_urls == null || js_urls.length === 0) {
          run_callbacks();
          return null;
        }
        console.log("Bokeh: BokehJS not loaded, scheduling load and callback at", now());
        root._bokeh_is_loading = js_urls.length;
        for (var i = 0; i < js_urls.length; i++) {
          var url = js_urls[i];
          var s = document.createElement('script');
          s.src = url;
          s.async = false;
          s.onreadystatechange = s.onload = function() {
            root._bokeh_is_loading--;
            if (root._bokeh_is_loading === 0) {
              console.log("Bokeh: all BokehJS libraries loaded");
              run_callbacks()
            }
          };
          s.onerror = function() {
            console.warn("failed to load library " + url);
          };
          console.log("Bokeh: injecting script tag for BokehJS library: ", url);
          document.getElementsByTagName("head")[0].appendChild(s);
        }
      };var element = document.getElementById("35011428-e5a3-44cb-871f-b93d36a0ac2d");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid '35011428-e5a3-44cb-871f-b93d36a0ac2d' but no matching script tag was found. ")
        return false;
      }
    
      var js_urls = ["https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.9.min.js"];
    
      var inline_js = [
        function(Bokeh) {
          Bokeh.set_log_level("info");
        },
        
        function(Bokeh) {
          
        },
        
        function(Bokeh) {
          (function() {
            var fn = function() {
              Bokeh.safely(function() {
                (function(root) {
                  function embed_document(root) {
                    var docs_json = {"7f4daff0-cb13-40e4-aea4-a10547126e95":{"roots":{"references":[{"attributes":{},"id":"ab4691ee-997b-46b8-97c3-b2eedd62f5be","type":"SaveTool"},{"attributes":{"overlay":{"id":"4bae3f7f-ead8-4d72-b787-259227748a25","type":"BoxAnnotation"}},"id":"1d83a007-6da8-4b60-8455-0ba0e67e1662","type":"BoxZoomTool"},{"attributes":{"children":[{"id":"74d71c4e-c62a-43c0-8757-10c951d73431","type":"Slider"},{"id":"0d79107a-7a6a-4972-a613-d1ef0179ec7c","type":"Slider"},{"id":"3c28eb62-a9cd-4ac8-a4f7-91ed020962fd","type":"Slider"},{"id":"f1f23ca6-ed0b-4786-a71a-fb4043c38970","type":"Slider"}]},"id":"5de54133-22f0-4619-8e98-18c6b5255321","type":"WidgetBox"},{"attributes":{},"id":"e2c7121d-0c35-4e2e-b84b-0724495c1d8e","type":"BasicTickFormatter"},{"attributes":{"line_alpha":{"value":0.6},"line_color":{"value":"#1f77b4"},"line_width":{"value":3},"x":{"field":"x"},"y":{"field":"y"}},"id":"32200659-a4dd-48f6-940c-57615a0eb49b","type":"Line"},{"attributes":{},"id":"32cfdef8-0880-4529-a995-f841aec5e770","type":"BasicTicker"},{"attributes":{"callback":{"id":"fe283c07-4ee0-405e-b08b-ff0ff2f62925","type":"CustomJS"},"end":10,"start":0.1,"step":0.1,"title":"Frequency","value":1},"id":"0d79107a-7a6a-4972-a613-d1ef0179ec7c","type":"Slider"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"line_width":{"value":3},"x":{"field":"x"},"y":{"field":"y"}},"id":"626a6811-1fe9-49f4-89f9-96f642e6df3c","type":"Line"},{"attributes":{"args":{"amp":{"id":"74d71c4e-c62a-43c0-8757-10c951d73431","type":"Slider"},"freq":{"id":"0d79107a-7a6a-4972-a613-d1ef0179ec7c","type":"Slider"},"offset":{"id":"f1f23ca6-ed0b-4786-a71a-fb4043c38970","type":"Slider"},"phase":{"id":"3c28eb62-a9cd-4ac8-a4f7-91ed020962fd","type":"Slider"},"source":{"id":"e85254bf-ce2a-4ad5-b406-ab3105f7ea61","type":"ColumnDataSource"}},"code":"\n    var data = source.data;\n    var A = amp.value;\n    var k = freq.value;\n    var phi = phase.value;\n    var B = offset.value;\n    x = data['x']\n    y = data['y']\n    for (i = 0; i < x.length; i++) {\n        y[i] = B + A*Math.sin(k*x[i]+phi);\n    }\n    source.change.emit();\n"},"id":"fe283c07-4ee0-405e-b08b-ff0ff2f62925","type":"CustomJS"},{"attributes":{"callback":{"id":"fe283c07-4ee0-405e-b08b-ff0ff2f62925","type":"CustomJS"},"end":10,"start":0.1,"step":0.1,"title":"Amplitude","value":1},"id":"74d71c4e-c62a-43c0-8757-10c951d73431","type":"Slider"},{"attributes":{},"id":"1e12c417-7828-4795-9cf0-57a36f734ad9","type":"LinearScale"},{"attributes":{},"id":"67e3308f-8683-499e-8463-748ac4fcf01a","type":"WheelZoomTool"},{"attributes":{},"id":"557b3b53-a863-4e86-b77f-3b98a2f9ef27","type":"LinearScale"},{"attributes":{"callback":{"id":"fe283c07-4ee0-405e-b08b-ff0ff2f62925","type":"CustomJS"},"end":6.4,"start":0,"step":0.1,"title":"Phase","value":0},"id":"3c28eb62-a9cd-4ac8-a4f7-91ed020962fd","type":"Slider"},{"attributes":{"formatter":{"id":"e2c7121d-0c35-4e2e-b84b-0724495c1d8e","type":"BasicTickFormatter"},"plot":{"id":"3fdd90ff-76e2-4174-8894-43fd8c437bc4","subtype":"Figure","type":"Plot"},"ticker":{"id":"32cfdef8-0880-4529-a995-f841aec5e770","type":"BasicTicker"}},"id":"b1ea22e6-32ec-4fde-beff-6b87575ed715","type":"LinearAxis"},{"attributes":{},"id":"57755ea7-d60a-4bd3-82a2-2d76da836f0f","type":"BasicTickFormatter"},{"attributes":{},"id":"d2aa00b2-63a3-470a-b27a-4d6a9830538a","type":"BasicTicker"},{"attributes":{},"id":"e84e216f-c7d0-4cc6-af94-05f48ca3374c","type":"PanTool"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"e84e216f-c7d0-4cc6-af94-05f48ca3374c","type":"PanTool"},{"id":"67e3308f-8683-499e-8463-748ac4fcf01a","type":"WheelZoomTool"},{"id":"1d83a007-6da8-4b60-8455-0ba0e67e1662","type":"BoxZoomTool"},{"id":"ab4691ee-997b-46b8-97c3-b2eedd62f5be","type":"SaveTool"},{"id":"6e7ab98d-6603-45d6-8d7b-992a5db3cd53","type":"ResetTool"},{"id":"f57878da-74f8-402e-991b-6ad59099b446","type":"HelpTool"}]},"id":"e417e421-a834-4268-b8e2-1a947dd69213","type":"Toolbar"},{"attributes":{"children":[{"id":"3fdd90ff-76e2-4174-8894-43fd8c437bc4","subtype":"Figure","type":"Plot"},{"id":"5de54133-22f0-4619-8e98-18c6b5255321","type":"WidgetBox"}]},"id":"62bbd7ad-bba8-4058-b410-d5a62688c1c4","type":"Row"},{"attributes":{"dimension":1,"plot":{"id":"3fdd90ff-76e2-4174-8894-43fd8c437bc4","subtype":"Figure","type":"Plot"},"ticker":{"id":"d2aa00b2-63a3-470a-b27a-4d6a9830538a","type":"BasicTicker"}},"id":"4e003536-c276-46c1-a6f8-349fe6d101db","type":"Grid"},{"attributes":{"data_source":{"id":"e85254bf-ce2a-4ad5-b406-ab3105f7ea61","type":"ColumnDataSource"},"glyph":{"id":"32200659-a4dd-48f6-940c-57615a0eb49b","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"626a6811-1fe9-49f4-89f9-96f642e6df3c","type":"Line"},"selection_glyph":null,"view":{"id":"ebaffcdf-05de-41dc-9745-4d0f93b279a5","type":"CDSView"}},"id":"ea12ea89-ff24-46ff-9127-be179dab5530","type":"GlyphRenderer"},{"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},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"4bae3f7f-ead8-4d72-b787-259227748a25","type":"BoxAnnotation"},{"attributes":{"below":[{"id":"b1ea22e6-32ec-4fde-beff-6b87575ed715","type":"LinearAxis"}],"left":[{"id":"6439cd8e-873f-4ddd-8724-8d6793e69a77","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"b1ea22e6-32ec-4fde-beff-6b87575ed715","type":"LinearAxis"},{"id":"0cd413fc-f832-462a-b013-cf7ca2c11253","type":"Grid"},{"id":"6439cd8e-873f-4ddd-8724-8d6793e69a77","type":"LinearAxis"},{"id":"4e003536-c276-46c1-a6f8-349fe6d101db","type":"Grid"},{"id":"4bae3f7f-ead8-4d72-b787-259227748a25","type":"BoxAnnotation"},{"id":"ea12ea89-ff24-46ff-9127-be179dab5530","type":"GlyphRenderer"}],"title":{"id":"f969e2da-b400-47a3-950f-d3763db124f9","type":"Title"},"toolbar":{"id":"e417e421-a834-4268-b8e2-1a947dd69213","type":"Toolbar"},"x_range":{"id":"e9eac90d-0af7-4959-ba82-369ec6053bbb","type":"DataRange1d"},"x_scale":{"id":"557b3b53-a863-4e86-b77f-3b98a2f9ef27","type":"LinearScale"},"y_range":{"id":"8cf66d79-67cd-4bd0-a6a2-997e0df896a2","type":"Range1d"},"y_scale":{"id":"1e12c417-7828-4795-9cf0-57a36f734ad9","type":"LinearScale"}},"id":"3fdd90ff-76e2-4174-8894-43fd8c437bc4","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"6e7ab98d-6603-45d6-8d7b-992a5db3cd53","type":"ResetTool"},{"attributes":{"callback":{"id":"fe283c07-4ee0-405e-b08b-ff0ff2f62925","type":"CustomJS"},"end":5,"start":-5,"step":0.1,"title":"Offset","value":0},"id":"f1f23ca6-ed0b-4786-a71a-fb4043c38970","type":"Slider"},{"attributes":{"callback":null,"column_names":["y","x"],"data":{"x":{"__ndarray__":"[encoded data, 5336 characters]","dtype":"float64","shape":[500]},"y":{"__ndarray__":"[encoded data, 5336 characters]","dtype":"float64","shape":[500]}}},"id":"e85254bf-ce2a-4ad5-b406-ab3105f7ea61","type":"ColumnDataSource"},{"attributes":{"formatter":{"id":"57755ea7-d60a-4bd3-82a2-2d76da836f0f","type":"BasicTickFormatter"},"plot":{"id":"3fdd90ff-76e2-4174-8894-43fd8c437bc4","subtype":"Figure","type":"Plot"},"ticker":{"id":"d2aa00b2-63a3-470a-b27a-4d6a9830538a","type":"BasicTicker"}},"id":"6439cd8e-873f-4ddd-8724-8d6793e69a77","type":"LinearAxis"},{"attributes":{"plot":{"id":"3fdd90ff-76e2-4174-8894-43fd8c437bc4","subtype":"Figure","type":"Plot"},"ticker":{"id":"32cfdef8-0880-4529-a995-f841aec5e770","type":"BasicTicker"}},"id":"0cd413fc-f832-462a-b013-cf7ca2c11253","type":"Grid"},{"attributes":{"callback":null},"id":"e9eac90d-0af7-4959-ba82-369ec6053bbb","type":"DataRange1d"},{"attributes":{"source":{"id":"e85254bf-ce2a-4ad5-b406-ab3105f7ea61","type":"ColumnDataSource"}},"id":"ebaffcdf-05de-41dc-9745-4d0f93b279a5","type":"CDSView"},{"attributes":{"callback":null,"end":10,"start":-10},"id":"8cf66d79-67cd-4bd0-a6a2-997e0df896a2","type":"Range1d"},{"attributes":{},"id":"f57878da-74f8-402e-991b-6ad59099b446","type":"HelpTool"},{"attributes":{"plot":null,"text":""},"id":"f969e2da-b400-47a3-950f-d3763db124f9","type":"Title"}],"root_ids":["62bbd7ad-bba8-4058-b410-d5a62688c1c4"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"7f4daff0-cb13-40e4-aea4-a10547126e95","elementid":"35011428-e5a3-44cb-871f-b93d36a0ac2d","modelid":"62bbd7ad-bba8-4058-b410-d5a62688c1c4"}];
                
                    root.Bokeh.embed.embed_items(docs_json, render_items);
                  }
                
                  if (root.Bokeh !== undefined) {
                    embed_document(root);
                  } else {
                    var attempts = 0;
                    var timer = setInterval(function(root) {
                      if (root.Bokeh !== undefined) {
                        embed_document(root);
                        clearInterval(timer);
                      }
                      attempts++;
                      if (attempts > 100) {
                        console.log("Bokeh: ERROR: Unable to embed document because BokehJS library is missing")
                        clearInterval(timer);
                      }
                    }, 10, root)
                  }
                })(window);
              });
            };
            if (document.readyState != "loading") fn();
            else document.addEventListener("DOMContentLoaded", fn);
          })();
        },
        function(Bokeh) {
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
        }
      ];
    
      function run_inline_js() {
        
        for (var i = 0; i < inline_js.length; i++) {
          inline_js[i].call(root, root.Bokeh);
        }
        
      }
    
      if (root._bokeh_is_loading === 0) {
        console.log("Bokeh: BokehJS loaded, going straight to plotting");
        run_inline_js();
      } else {
        load_libs(js_urls, function() {
          console.log("Bokeh: BokehJS plotting callback run at", now());
          run_inline_js();
        });
      }
    }(window));
  };
  if (document.readyState != "loading") fn();
  else document.addEventListener("DOMContentLoaded", fn);
})();
