-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various small updates and fixes to web calculator.
Added Zenodo DOI
- Loading branch information
Showing
8 changed files
with
123 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
webcalculator/page_functional/bokeh/RCRplot_functional.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
|
||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
|
||
<meta charset="utf-8"> | ||
<title>Bokeh Plot</title> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-1.3.4.min.js"></script> | ||
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.3.4.min.js"></script> | ||
<script type="text/javascript"> | ||
Bokeh.set_log_level("info"); | ||
</script> | ||
|
||
|
||
|
||
|
||
</head> | ||
|
||
|
||
<body> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="bk-root" id="413c6406-2e5c-4306-9f1f-0f149e783384" data-root-id="1084"></div> | ||
|
||
|
||
|
||
|
||
|
||
<script type="application/json" id="1202"> | ||
{"6ac99b14-9580-43d9-bb8f-c4f029b0f4b7":{"roots":{"references":[{"attributes":{"callback":null},"id":"1007","type":"DataRange1d"},{"attributes":{"text":""},"id":"1041","type":"Title"},{"attributes":{"callback":null},"id":"1005","type":"DataRange1d"},{"attributes":{},"id":"1009","type":"LinearScale"},{"attributes":{"callback":null,"data":{"x_rejected":[],"y_rejected":[]},"selected":{"id":"1079","type":"Selection"},"selection_policy":{"id":"1080","type":"UnionRenderers"}},"id":"1002","type":"ColumnDataSource"},{"attributes":{},"id":"1028","type":"HelpTool"},{"attributes":{"fill_alpha":{"value":0.5},"fill_color":{"value":"red"},"line_alpha":{"value":0.5},"line_color":{"value":"red"},"size":{"units":"screen","value":5},"x":{"field":"x_rejected"},"y":{"field":"y_rejected"}},"id":"1051","type":"Circle"},{"attributes":{"button_type":"primary","callback":null,"icon":null,"js_event_callbacks":{"button_click":[{"id":"1082","type":"CustomJS"}]},"label":"Plot Results"},"id":"1083","type":"Button"},{"attributes":{"ticker":{"id":"1014","type":"BasicTicker"}},"id":"1017","type":"Grid"},{"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":"1029","type":"Toolbar"},{"attributes":{},"id":"1062","type":"Selection"},{"attributes":{"source":{"id":"1003","type":"ColumnDataSource"}},"id":"1069","type":"CDSView"},{"attributes":{},"id":"1079","type":"Selection"},{"attributes":{"label":{"value":"fitted model"},"renderers":[{"id":"1068","type":"GlyphRenderer"}]},"id":"1081","type":"LegendItem"},{"attributes":{},"id":"1019","type":"BasicTicker"},{"attributes":{},"id":"1080","type":"UnionRenderers"},{"attributes":{"children":[{"id":"1083","type":"Button"},{"id":"1004","subtype":"Figure","type":"Plot"}]},"id":"1084","type":"Column"},{"attributes":{},"id":"1011","type":"LinearScale"},{"attributes":{},"id":"1044","type":"BasicTickFormatter"},{"attributes":{"data_source":{"id":"1003","type":"ColumnDataSource"},"glyph":{"id":"1066","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1067","type":"Line"},"selection_glyph":null,"view":{"id":"1069","type":"CDSView"}},"id":"1068","type":"GlyphRenderer"},{"attributes":{},"id":"1024","type":"WheelZoomTool"},{"attributes":{},"id":"1046","type":"BasicTickFormatter"},{"attributes":{},"id":"1027","type":"ResetTool"},{"attributes":{"args":{"p":{"id":"1004","subtype":"Figure","type":"Plot"},"sourceall":{"id":"1003","type":"ColumnDataSource"},"sourcenon":{"id":"1001","type":"ColumnDataSource"},"sourcerej":{"id":"1002","type":"ColumnDataSource"}},"code":"\n console.log('Plot Generating...');\n\n p.reset.emit();\n\n var datanon = sourcenon.data;\n var datarej = sourcerej.data;\n var dataall = sourceall.data;\n\n var x_rejected = datarej['x_rejected']\n var y_rejected = datarej['y_rejected']\n var x_nonrejected = datanon['x_nonrejected']\n var y_nonrejected = datanon['y_nonrejected']\n var x_original = dataall['x_original']\n var y_fitted = dataall['y_fitted']\n\n for (var i = 0; i < x_rejected_result.length; i++) {\n x_rejected[i] = x_rejected_result[i]\n y_rejected[i] = y_rejected_result[i]\n }\n for (var i = 0; i < x_nonrejected_result.length; i++) {\n x_nonrejected[i] = x_nonrejected_result[i]\n y_nonrejected[i] = y_nonrejected_result[i]\n }\n\n x_original = [];\n y_fitted = [];\n\n // console.log(x_original_result.length);\n\n for (var i = 0; i < x_original_result.length; i++) {\n x_original.push(x_original_result[i]);\n y_fitted.push(y_fitted_result[i]);\n }\n\n datarej['x_rejected'] = x_rejected;\n datarej['y_rejected'] = y_rejected;\n datanon['x_nonrejected'] = x_nonrejected;\n datanon['y_nonrejected'] = y_nonrejected;\n dataall['x_original'] = x_original;\n dataall['y_fitted'] = y_fitted;\n\n // console.log(dataall['x_original']);\n // console.log(dataall['y_fitted']);\n\n sourcenon.change.emit();\n sourcerej.change.emit();\n sourceall.change.emit();\n p.change.emit();\n"},"id":"1082","type":"CustomJS"},{"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":"1047","type":"BoxAnnotation"},{"attributes":{"data_source":{"id":"1001","type":"ColumnDataSource"},"glyph":{"id":"1037","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1038","type":"Circle"},"selection_glyph":null,"view":{"id":"1040","type":"CDSView"}},"id":"1039","type":"GlyphRenderer"},{"attributes":{"callback":null,"data":{"x_nonrejected":[],"y_nonrejected":[]},"selected":{"id":"1062","type":"Selection"},"selection_policy":{"id":"1063","type":"UnionRenderers"}},"id":"1001","type":"ColumnDataSource"},{"attributes":{"items":[{"id":"1049","type":"LegendItem"},{"id":"1064","type":"LegendItem"},{"id":"1081","type":"LegendItem"}]},"id":"1048","type":"Legend"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":5},"x":{"field":"x_rejected"},"y":{"field":"y_rejected"}},"id":"1052","type":"Circle"},{"attributes":{"source":{"id":"1001","type":"ColumnDataSource"}},"id":"1040","type":"CDSView"},{"attributes":{"label":{"value":"nonrejected data"},"renderers":[{"id":"1039","type":"GlyphRenderer"}]},"id":"1049","type":"LegendItem"},{"attributes":{},"id":"1014","type":"BasicTicker"},{"attributes":{"dimension":1,"ticker":{"id":"1019","type":"BasicTicker"}},"id":"1022","type":"Grid"},{"attributes":{"data_source":{"id":"1002","type":"ColumnDataSource"},"glyph":{"id":"1051","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1052","type":"Circle"},"selection_glyph":null,"view":{"id":"1054","type":"CDSView"}},"id":"1053","type":"GlyphRenderer"},{"attributes":{"axis_label":"y","formatter":{"id":"1044","type":"BasicTickFormatter"},"ticker":{"id":"1019","type":"BasicTicker"}},"id":"1018","type":"LinearAxis"},{"attributes":{},"id":"1023","type":"PanTool"},{"attributes":{"fill_alpha":{"value":0.5},"fill_color":{"value":"navy"},"line_alpha":{"value":0.5},"line_color":{"value":"navy"},"size":{"units":"screen","value":5},"x":{"field":"x_nonrejected"},"y":{"field":"y_nonrejected"}},"id":"1037","type":"Circle"},{"attributes":{},"id":"1095","type":"Selection"},{"attributes":{"below":[{"id":"1013","type":"LinearAxis"}],"center":[{"id":"1017","type":"Grid"},{"id":"1022","type":"Grid"},{"id":"1048","type":"Legend"}],"left":[{"id":"1018","type":"LinearAxis"}],"renderers":[{"id":"1039","type":"GlyphRenderer"},{"id":"1053","type":"GlyphRenderer"},{"id":"1068","type":"GlyphRenderer"}],"title":{"id":"1041","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":"1004","subtype":"Figure","type":"Plot"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":5},"x":{"field":"x_nonrejected"},"y":{"field":"y_nonrejected"}},"id":"1038","type":"Circle"},{"attributes":{"source":{"id":"1002","type":"ColumnDataSource"}},"id":"1054","type":"CDSView"},{"attributes":{},"id":"1063","type":"UnionRenderers"},{"attributes":{},"id":"1096","type":"UnionRenderers"},{"attributes":{"overlay":{"id":"1047","type":"BoxAnnotation"}},"id":"1025","type":"BoxZoomTool"},{"attributes":{"axis_label":"x","formatter":{"id":"1046","type":"BasicTickFormatter"},"ticker":{"id":"1014","type":"BasicTicker"}},"id":"1013","type":"LinearAxis"},{"attributes":{"label":{"value":"rejected data"},"renderers":[{"id":"1053","type":"GlyphRenderer"}]},"id":"1064","type":"LegendItem"},{"attributes":{},"id":"1026","type":"SaveTool"},{"attributes":{"line_color":"green","line_width":2,"x":{"field":"x_original"},"y":{"field":"y_fitted"}},"id":"1066","type":"Line"},{"attributes":{"callback":null,"data":{"x_original":[],"y_fitted":[]},"selected":{"id":"1095","type":"Selection"},"selection_policy":{"id":"1096","type":"UnionRenderers"}},"id":"1003","type":"ColumnDataSource"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":2,"x":{"field":"x_original"},"y":{"field":"y_fitted"}},"id":"1067","type":"Line"}],"root_ids":["1084"]},"title":"Bokeh Application","version":"1.3.4"}} | ||
</script> | ||
<script type="text/javascript"> | ||
(function() { | ||
var fn = function() { | ||
Bokeh.safely(function() { | ||
(function(root) { | ||
function embed_document(root) { | ||
|
||
var docs_json = document.getElementById('1202').textContent; | ||
var render_items = [{"docid":"6ac99b14-9580-43d9-bb8f-c4f029b0f4b7","roots":{"1084":"413c6406-2e5c-4306-9f1f-0f149e783384"}}]; | ||
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 run BokehJS code because BokehJS library is missing"); | ||
clearInterval(timer); | ||
} | ||
}, 10, root) | ||
} | ||
})(window); | ||
}); | ||
}; | ||
if (document.readyState != "loading") fn(); | ||
else document.addEventListener("DOMContentLoaded", fn); | ||
})(); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.