Skip to content
Snippets Groups Projects
Commit d9e3ad64 authored by swagner-de's avatar swagner-de
Browse files

some message

parent f6840215
Branches
No related tags found
No related merge requests found
README 0 → 100644
The ./src directory needs to be placed in a plain accessible folder on the webserver. According paths and URIs then have to be modified in Python and Javascript files within in the beaker notebook
This diff is collapsed.
{
"beaker": "2",
"evaluators": [
{
"name": "HTML",
"plugin": "HTML",
"view": {
"cm": {
"mode": "smartHTMLMode"
}
}
},
{
"name": "JavaScript",
"plugin": "JavaScript",
"view": {
"cm": {
"mode": "javascript",
"background": "#FFE0F0"
}
},
"languageVersion": "ES2015"
},
{
"name": "Python3",
"plugin": "Python3",
"setup": "%matplotlib inline\nimport numpy\nimport matplotlib\nfrom matplotlib import pylab, mlab, pyplot\nnp = numpy\nplt = pyplot\nfrom IPython.display import display\nfrom IPython.core.pylabtools import figsize, getfigs\nfrom pylab import *\nfrom numpy import *\n",
"view": {
"cm": {
"mode": "python"
}
}
}
],
"cells": [
{
"id": "codeEyjQTB",
"type": "code",
"evaluator": "Python3",
"input": {
"body": [
"from IPython.core.display import display, HTML",
"import htmlPy",
"",
"",
"h = HTML('''",
"",
"<script type=\"application/json\" id=\"\">",
" {",
" \"unicorns\": \"awesome\",",
" \"abc\": [1, 2, 3]",
" }",
" ",
"</script>",
"<script>var stuff = JSON.parse(document.getElementById('stuff').innerHTML);",
"document.getElementById('a').innerHTML = JSON.stringify(stuff)",
"</script>",
"<div id='a'></div>",
"''' ",
" )",
"#display(h)",
""
]
},
"output": {
"state": {},
"result": {
"type": "BeakerDisplay",
"innertype": "Error",
"object": [
"No module named &apos;PySide&apos;",
"No module named &apos;PySide&apos;<br><span class=\"ansired\">---------------------------------------------------------------------------</span><br><span class=\"ansired\">ImportError</span> Traceback (most recent call last)<br><span class=\"ansigreen\">&lt;ipython-input-1-307ef53c7a70&gt;</span> in <span class=\"ansicyan\">&lt;module&gt;<span class=\"ansiblue\">()</span>\n<span class=\"ansigreen\"> 1</span> <span class=\"ansigreen\">from</span> IPython<span class=\"ansiblue\">.</span>core<span class=\"ansiblue\">.</span>display <span class=\"ansigreen\">import</span> display<span class=\"ansiblue\">,</span> HTML<span class=\"ansiblue\"></span>\n<span class=\"ansigreen\">----&gt; 2<span class=\"ansired\"> <span class=\"ansigreen\">import</span> htmlPy<span class=\"ansiblue\"></span>\n<span class=\"ansigreen\"> 3</span> <span class=\"ansiblue\"></span>\n<span class=\"ansigreen\"> 4</span> <span class=\"ansiblue\"></span>\n<span class=\"ansigreen\"> 5</span> h = HTML(&apos;&apos;&apos;\n<br><span class=\"ansigreen\">/home/beaker/py3k/lib/python3.4/site-packages/htmlPy/__init__.py</span> in <span class=\"ansicyan\">&lt;module&gt;<span class=\"ansiblue\">()</span>\n<span class=\"ansigreen\"> 2</span> unicode <span class=\"ansiblue\">=</span> str <span class=\"ansigreen\">if</span> sys<span class=\"ansiblue\">.</span>version_info <span class=\"ansiblue\">&gt;=</span> <span class=\"ansiblue\">(</span><span class=\"ansicyan\">3</span><span class=\"ansiblue\">,</span> <span class=\"ansicyan\">0</span><span class=\"ansiblue\">)</span> <span class=\"ansigreen\">else</span> unicode<span class=\"ansiblue\"></span>\n<span class=\"ansigreen\"> 3</span> <span class=\"ansiblue\"></span>\n<span class=\"ansigreen\">----&gt; 4<span class=\"ansired\"> <span class=\"ansigreen\">from</span> PySide<span class=\"ansiblue\">.</span>QtCore <span class=\"ansigreen\">import</span> QObject <span class=\"ansigreen\">as</span> Object<span class=\"ansiblue\"></span>\n<span class=\"ansigreen\"> 5</span> <span class=\"ansigreen\">from</span> PySide<span class=\"ansiblue\">.</span>QtCore <span class=\"ansigreen\">import</span> Slot<span class=\"ansiblue\"></span>\n<span class=\"ansigreen\"> 6</span> <span class=\"ansigreen\">from</span> <span class=\"ansiblue\">.</span>base_gui <span class=\"ansigreen\">import</span> BaseGUI<span class=\"ansiblue\"></span>\n<br><span class=\"ansired\">ImportError</span>: No module named &apos;PySide&apos;"
]
},
"selectedType": "BeakerDisplay",
"pluginName": "Python3",
"shellId": "1BB843F0F56D46468C62856172838D3B",
"elapsedTime": 415,
"height": 81
},
"evaluatorReader": true,
"lineCount": 21,
"isError": true
},
{
"id": "codevNb1zt",
"type": "code",
"evaluator": "HTML",
"input": {
"body": [
"<html>",
"<table>",
" <tr>",
" <td>",
" </td>",
" </tr>",
" </table>",
"",
"</html>"
]
},
"output": {
"state": {},
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n\n<table>\n <tbody><tr>\n <td>\n </td>\n </tr>\n </tbody></table>\n\n"
},
"selectedType": "BeakerDisplay",
"elapsedTime": 1,
"height": 51
},
"evaluatorReader": true,
"lineCount": 9,
"isError": false
}
],
"namespace": {}
}
...@@ -18,30 +18,16 @@ ...@@ -18,30 +18,16 @@
<script language="javascript" type="text/javascript" src="flot/jquery.flot.canvas.js"></script> <script language="javascript" type="text/javascript" src="flot/jquery.flot.canvas.js"></script>
<script language="javascript" type="text/javascript" src="flot/jquery.colorhelpers.js"></script> <script language="javascript" type="text/javascript" src="flot/jquery.colorhelpers.js"></script>
<script language="javascript" type="text/javascript" src="flot/jquery.flot.selection.js"></script> <script language="javascript" type="text/javascript" src="flot/jquery.flot.selection.js"></script>
<!--<script language="javascript" type="text/javascript" src="flot/jquery.flot.navigate.js"></script>--> <!--<script language="javascript" type="text/javascript" src="flot/jquery.flot.navigate.js"></script>
<script language="javascript" type="text/javascript" src="canvas2image.js"></script>-->
<!--<script language="javascript" type="text/javascript" src="canvas2image.js"></script>-->
<script type="text/javascript" src="flot/jquery.flot.labels.js"></script> <script type="text/javascript" src="flot/jquery.flot.labels.js"></script>
<link href="band_flot.css" rel="stylesheet" type="text/css">
<!--<script src="js/jquery-1.min.js"></script>-->
<script src="js/jquery.event.move.js"></script> <script src="js/jquery.event.move.js"></script>
<script src="js/jquery.twentytwenty.js"></script> <script src="js/jquery.twentytwenty.js"></script>
<script type="text/javascript" src="initiate.js"> </script>
<script type="text/javascript"src="main.js"> </script> <link href="band_flot.css" rel="stylesheet" type="text/css">
<script>initiate()</script>
<script type="text/javascript" src="plot_band_dos.js"> </script> <script type="text/javascript" src="plot_band_dos.js"> </script>
<script src="band_tools.js"></script>
<!-------Comparison of two band structures--> <!-------Comparison of two band structures-->
<!--<link href="css/foundation.css" rel="stylesheet" type="text/css" />--> <!--<link href="css/foundation.css" rel="stylesheet" type="text/css" />-->
...@@ -50,21 +36,21 @@ ...@@ -50,21 +36,21 @@
</head> </head>
<body> <body>
<pre id="output"></pre> <pre id="output"></pre>
<div id="headline1_vis" style = "padding-left:5%; font-family: Arial; font-size: 230%; font-weight: 900; color: #000">Band structure and density of states</div> <div id="headline1_vis" style = "padding-left:5%; font-family: Arial; font-size: 230%; font-weight: 900; color: #000">Band structures and density of states</div>
<table>
<tr><td>
<div style = "padding-left:5%; padding-top: 30px; font-family: Arial; font-size: 140%; font-weight: 500; color: #000">System information</div>
<div style = "padding-left:10%; padding-top: 5px; font-family: Arial; font-size: 100%; ">
<p><b>Material:</b> XXXX </p>
<p><b>Code:</b> XXXX</p>
</div>
<div id="miniature" style="width:100%; height: 1px; float:left; border-top: 1px solid #888888; background: url(img/bg-toolbar.gif); margin-top: 25px; "></div> <div id="miniature" style="width:100%; height: 1px; float:left; border-top: 1px solid #888888; background: url(img/bg-toolbar.gif); margin-top: 25px; "></div>
<!--<div style = "padding-left:5%; padding-top: 50px; font-family: Arial; font-size: 140%; font-weight: 500; color: #000">System information</div>-->
<table>
<tr>
<td>
<div id="description1_vis"></div> <div id="description1_vis"></div>
<div class="demo-container_vis" style = "padding-left:5%;"> <div class="demo-container_vis" style = "padding-left:5%;">
<div id="placeholder" class="demo-placeholder"></div> <div id="placeholder_band" class="demo-placeholder"></div>
<div id="placeholder2" class="demo-placeholder2"></div> <div id="placeholder_dos" class="demo-placeholder2"></div>
</div> </div>
<div id="toolbar" style="width:100%; height: 350px; float:left; border-top: 1px solid #888888; border-bottom: 1px solid #888888; background: url(img/bg-toolbar.gif); margin-top: 25px; "> <div id="toolbar" style="width:100%; height: 350px; float:left; border-top: 1px solid #888888; border-bottom: 1px solid #888888; background: url(img/bg-toolbar.gif); margin-top: 25px; ">
<table>
<tr>
<td>
<!---moz-box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05); <!---moz-box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05);
-webkit-box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05); -webkit-box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05)">--> box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05)">-->
...@@ -73,22 +59,24 @@ ...@@ -73,22 +59,24 @@
<p></p> <p></p>
</div> </div>
<div id="overview" style="width:300px;height:200px; margin-left:60px; margin-top: 50px; padding-top: 0px"></div> <div id="overview" style="width:300px;height:200px; margin-left:60px; margin-top: 50px; padding-top: 0px"></div>
<p id="overviewLegend" style="margin-left:10px"></p> <p id="overviewLegend" style="margin-left:10px"></p>
<!-- </td>
<div style = "width: 100px; height: 25px; margin-top: -200px; margin-left:300px; font-size: 0.8em; font-family: Arial"> <td>
<div style = "width: 25px; height: 25px; border: 1px dashed #8888; margin-top: 10px; margin-left:90px; font-size: 0.8em; font-family: Arial"> <div style = "padding-left:20px; padding-top: 50px; font-family: Arial; font-size: 100%; ">
<a href=# title="Select and zoom"><img src="img/Select_zoom.png" width="25" height="25" border="0"></a> <div id = "atom_labels_1" style = "padding-top: 15px;">Atom labels:</div>
<a href="" title="Select and zoom" onMouseOver="On(0)" onMouseOut="Off(0)"><img src="img/Select_Zoom.png" width="25" height="25" border="0" name="img0"></a> <div id = "program_name_1" style = "padding-top: 15px;">Code:</div>
</div> <div id = "program_basis_set_type_1" style = "padding-top: 15px;">Basis set:</div>
<div id = "XC_functional_name_1" style = "padding-top: 15px;"></div>
</div> </div>
--> </td>
</tr>
</table>
<div style = "margin-left: 20px;"> <div style = "margin-left: 20px;">
<button id="save_band_img" onclick = "save_band()">Export band structure as image</button> <button id="save_band_img" onclick = "save_band()" class = "botton_style">Export band structure as image</button>
<button id="save_dos_img" onclick = "save_dos()">Export DOS as image</button> <button id="save_dos_img" onclick = "save_dos()" class = "botton_style">Export DOS as image</button>
<!--<button id="save_all_img" onclick = "save_all()">Export image</button>--> <!--<button id="save_all_img" onclick = "save_all()">Export image</button>-->
<button id="save_dos_img" onclick = "reset()">Reset</button> <button id="reset" onclick = "reset(1)" class = "botton_style">Reset</button>
<button id="save_dos_img" onclick = "autoscale()">Autoscale</button> <button id="autoscale" onclick = "autoscale(1)" class = "botton_style">Autoscale</button>
<!--<select id="selections"> <!--<select id="selections">
...@@ -104,38 +92,87 @@ ...@@ -104,38 +92,87 @@
</div> </div>
</div> </div>
</td> </td>
<td> <td>
<!-----The 2nd band structure----------------> <!-----The 2nd band structure---------------->
<div id="description1_vis"></div>
<div class="demo-container_vis" style = "padding-left:5%; display = 'inline';"> <div class="demo-container_vis" style = "padding-left:5%; display = 'inline';">
<div id="placeholder3" class="demo-placeholder"></div> <div id="placeholder_band2" class="demo-placeholder"></div>
<div id="placeholder4" class="demo-placeholder2"></div> <div id="placeholder_dos2" class="demo-placeholder2"></div>
</div> </div>
<div id="toolbar" style="width:100%; height: 350px; float:left; border-top: 1px solid #888888; border-bottom: 1px solid #888888; background: url(img/bg-toolbar.gif); margin-top: 25px; ">
<div style="margin-left:5%; margin-top: 5em; width: 600px;"> <table>
<div style = "font-family: Arial; font-size: 100%"> <tr>
<p>Choose the second material to compare the band structures.</p> <td>
<!---moz-box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05);
-webkit-box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05)">-->
<div id = "select_zoom" style = "width:100%; height:10px; float: left; margin-left: 80px; margin-top: 15px; font-size: 17px; font-family: Arial">
Select and zoom: <img src="img/select_zoom_0.png" width="18" height="18" border="0"> </img>
<p></p>
</div>
<div id="overview2" style="width:300px;height:200px; margin-left:60px; margin-top: 50px; padding-top: 0px"></div>
<p id="overviewLegend2" style="margin-left:10px"></p>
</td>
<td>
<div style = "padding-left:20px; padding-top: 50px; font-family: Arial; font-size: 100%; ">
<div id = "atom_labels_2" style = "padding-top: 15px;"></div>
<div id = "program_name_2" style = "padding-top: 15px;"></div>
<div id = "program_basis_set_type_2" style = "padding-top: 15px;"></div>
<div id = "XC_functional_name_2" style = "padding-top: 15px;"></div>
</div> </div>
<div><button onclick = "plot_2nd_band()">Get</button> </div> </td>
<!--<div><button onclick = "hide_2nd_band()">hide</button> </div>--> </tr>
</table>
<div style = "margin-left: 20px;">
<button id="save_band_img" onclick = "save_band()" class = "botton_style">Export band structure as image</button>
<button id="save_dos_img" onclick = "save_dos()" class = "botton_style">Export DOS as image</button>
<!--<button id="save_all_img" onclick = "save_all()">Export image</button>-->
<button id="reset" onclick = "reset(2)" class = "botton_style">Reset</button>
<button id="autoscale" onclick = "autoscale(2)" class = "botton_style">Autoscale</button>
<div style = "font-family: Arial; font-size: 100%">
<p>Drag and see the differences between the band structures of two materials.</p> <!--<select id="selections">
<option value="png">png</option>
<option value="jpeg">jpeg</option>
<option value="bmp">bmp</option>
</select><br/>
width : <input type="number" value="300" id="img_Width" /><br/>
height : <input type="number" value="200" id="img_Height" />
display:none;
style="display: none;"
-->
</div> </div>
<div><button onclick = "image_comparison()">Compare</button> </div>
<div>
<div id="img_comparison" class="twentytwenty-container">
<!--<img src = image_band />-->
<!--<img id="img_compare_1"/> src="img/1_1.jpg" />-->
<!--<img id="img_compare_2"/> src="img/1_2.jpg" />-->
</div> </div>
</td>
</tr>
</table>
<!-----Comparison of two band structures----->
<div style = "margin-left:5%; padding-top:20px; font-family: Arial; font-size: 230%; font-weight:900">
Comparison of two materials
</div> </div>
<div style="margin-left:5%; margin-top: 20px; width: 600px;">
<table>
<tr>
<!--<div><button onclick = "plot_2nd_band()">Get</button> </div>
<div><button onclick = "hide_2nd_band()">hide</button> </div>-->
<td>
<div style = "font-family: Arial; font-size: 100%">
<p>Drag and see the differences between the band structures of two materials.</p>
</div> </div>
</td>
<td>
<div><button onclick = "image_comparison();" class = "botton_style_large">Compare</button> </div>
</td>
</tr> </tr>
</table> </table>
<div>
<div id="img_comparison" class="twentytwenty-container" ></div>
</div>
</div>
...@@ -150,3 +187,4 @@ ...@@ -150,3 +187,4 @@
</body> </body>
</html> </html>
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
} }
.demo-container_vis { .demo-container_vis {
box-sizing: border-box; box-sizing: border-box;
width: 800px; width: 700px;
height: 500px; height: 450px;
padding-left: 20px; padding-left: 20px;
padding-top: 50px; padding-top: 10px;
padding-right: 1em; padding-right: 1em;
margin: 0; margin: 0;
border: 0; border: 0;
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.demo-placeholder { .demo-placeholder {
font-family: Verdana,Arial,sans-serif; font-family: Verdana,Arial,sans-serif;
font-size: 0.875em; font-size: 0.875em;
width: 74%; width: 76%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
float:left; float:left;
...@@ -33,10 +33,11 @@ ...@@ -33,10 +33,11 @@
.demo-placeholder2 { .demo-placeholder2 {
font-family: Verdana,Arial,sans-serif; font-family: Verdana,Arial,sans-serif;
font-size: 0.875em; font-size: 0.875em;
width: 26%; width: 24%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
float:left; float:left;
padding-left: 0px;
} }
.demo-placeholder_overview_text { .demo-placeholder_overview_text {
...@@ -185,3 +186,14 @@ ...@@ -185,3 +186,14 @@
height: 800px; height: 800px;
background-color: #fff; background-color: #fff;
}*/ }*/
.botton_style{
height:30px;
border:2px blue none;
background-color: #d6dfe3
}
.botton_style_large{
width:100px;
height:40px;
border:2px blue none;
background-color: #d6dfe3
}
plot_band_dos_main(band_file_1, dos_file_1, "#placeholder_band", "#placeholder_dos", "#overview", upperLim, lowerLim);
plot_band_dos_main(band_file_2, dos_file_2, "#placeholder_band2", "#placeholder_dos2", "#overview2", upperLim, lowerLim);
//Parameters for plotting
/*
var top_band_bottum = 100.0;
var bottum_band_top = -1000.0;
var image_band;
var image_band_1, image_band_2;//for comparison
var image_dos_1, image_dos_2;
var image_combined;
var circleoff;
var circleon;
if(document.images){
circleoff=new Image(50,50);
circleoff.src="img/Select_Zoom.png";
circleon=new Image(50,50);
circleon.src="img/Select_Zoom.png";
}
function On(name){
if(document.images){
document.images['img'+name].src=circleon.src;
}
}
function Off(name){
if(document.images){
document.images['img'+name].src=circleoff.src;
}
}
*/
function save_band()
{
document.location.href = image_band;
/*
//ctx = canvas.getContext('2d');
$save = document.getElementById('save');
$selections = document.getElementById('selections');
//$imgs = document.getElementById('imgs');
$img_W= document.getElementById('img_Width');
$img_H = document.getElementById('img_Height');
var type = $selections.value;
var w = $img_W.value;
var h = $img_H.value;
//alert("img sizes: " + w + "X" + h);
Canvas2Image.saveAsImage(canvas, w, h, type, 'customName');
//alert("end function save_img_bind");
*/
}
function save_dos()
{
document.location.href = image_dos;
}
function save_all()
{
//Get a combined canvas for both band and dos
//var c = document.createElement("canvas");
var c=document.getElementById("myCanvas");
var ctx = c.getContext("2d");
var imageObj1 = new Image();
var imageObj2 = new Image();
imageObj1.src = image_band;
ctx.drawImage(imageObj1, 0, 0);
imageObj2.src = image_dos;
ctx.drawImage(imageObj2, 600, 0);
image_combined = c.toDataURL();
image_combined = image_combined.replace("image/png","image/octet-stream");
document.location.href = image_combined;
}
function autoscale(ID)
{
var placeholder_band;
var placeholder_dos;
var placeholder_overview;
if(ID == 1)
{
placeholder_band = "#placeholder_band";
placeholder_dos = "#placeholder_dos";
placeholder_overview = "#overview";
}
else if(ID == 2)
{
placeholder_band = "#placeholder_band2";
placeholder_dos = "#placeholder_dos2";
placeholder_overview = "#overview2";
}
else
alert('Autoscale: div not found!');
band_file = band_file_obj[placeholder_band];
dos_file = dos_file_obj[placeholder_band];
//alert('band file: '+band_file + ' dos_file:'+dos_file);
//alert(placeholder_band + placeholder_dos);
upperLim = top_band_bottum[placeholder_band];
//alert('upperlim: '+upperLim);
lowerLim = -10.01;
//lowerLim = bottum_band_top;
////alert('bottum_band_top: '+bottum_band_top);
plot_band_dos_main(band_file, dos_file, placeholder_band, placeholder_dos, placeholder_overview, upperLim, lowerLim);
}
function reset(ID)
{
var placeholder_band;
var placeholder_dos;
var placeholder_overview;
if(ID == 1)
{
placeholder_band = "#placeholder_band";
placeholder_dos = "#placeholder_dos";
placeholder_overview = "#overview";
}
else if(ID == 2)
{
placeholder_band = "#placeholder_band2";
placeholder_dos = "#placeholder_dos2";
placeholder_overview = "#overview2";
}
else
alert('Autoscale: div not found!');
band_file = band_file_obj[placeholder_band];
dos_file = dos_file_obj[placeholder_band];
//alert('band file: '+band_file + ' dos_file:'+dos_file);
//alert(placeholder_band + placeholder_dos);
upperLim = 10.01;
lowerLim = -10.01;
plot_band_dos_main(band_file, dos_file, placeholder_band, placeholder_dos, placeholder_overview, upperLim, lowerLim);
}
/*
function plot_2nd_band()
{
//document.getElementById("#placeholder3").style.display = 'inline';
main_div_band = "#placeholder3";
main_div_dos = "#placeholder4";
band_file = band_file_original_2;
dos_file = dos_file_original_2;
upperLim = 10.01;
lowerLim = - 10.01;
$.getJSON(band_file, get_band_data);
}
*/
/*
function hide_2nd_band()
{
document.getElementById("#placeholder3").style.display = 'none';
}
*/
function image_comparison(){
////alert(image_band_1);
////alert(image_band_2);
var url_1 = image_band_1;
var url_2 = image_band_2;
var img_1 = document.createElement("img");
img_1.src=url_1;//"img/1_1.jpg";
document.getElementById("img_comparison").appendChild(img_1);
var img_2 = document.createElement("img");
img_2.src=url_2;//"img/1_2.jpg";
document.getElementById("img_comparison").appendChild(img_2);
$(".twentytwenty-container[data-orientation!='vertical']").twentytwenty({default_offset_pct: 0.7});
$(".twentytwenty-container[data-orientation='vertical']").twentytwenty({default_offset_pct: 0.3, orientation: 'vertical'});
}
params={};
window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,
function(str,key,value) {
params[key] = value;
});
base = "/user/src/tmp/"
//----------------Input files -------------------------------
band_file_original_1 = base + params['band_file'];
band_file_original_2 = base + params['band_file2'];
dos_file_original_1 = base + params['dos_file'];
dos_file_original_2 = base + params['dos_file2'];
//var dos_file = 'data/P1etRNSyX01fCnpA_StJhXrC7bCpp.json';
//-----------------------------------------------------------
var band_file_1 = band_file_original_1;
var dos_file_1 = dos_file_original_1;
var band_file_2 = band_file_original_2;
var dos_file_2 = dos_file_original_2;
var band_file_obj = {};
var dos_file_obj = {};
var upperLim = 10.01;
var lowerLim = - 10.01;
var top_band_bottum = {};
var bottum_band_top = {};
var bands_1 = new Array(); // To record the initial band data for each material
var bands_2 = new Array();
var dos_1 = new Array();
var dos_2 = new Array();
band_file_obj['#placeholder_band'] = band_file_original_1;
dos_file_obj['#placeholder_band'] = dos_file_original_1;
band_file_obj['#placeholder_band2'] = band_file_original_2;
dos_file_obj['#placeholder_band2'] = dos_file_original_2;
\ No newline at end of file
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment