2019-09-14 15:05:55 +02:00
|
|
|
---
|
2019-09-26 14:23:48 +02:00
|
|
|
title: "One dataset"
|
2019-09-14 15:05:55 +02:00
|
|
|
date: 2019-08-29 09:00
|
|
|
|
draft: false
|
|
|
|
---
|
|
|
|
<script src="/scripts/data.js" type="text/javascript"></script>
|
2019-09-26 09:32:03 +02:00
|
|
|
<script src="/scripts/loadAllData.js" type="text/javascript"></script>
|
2019-09-14 15:05:55 +02:00
|
|
|
<script src="/scripts/getFullDataPath.js" type="text/javascript"></script>
|
|
|
|
<script src="/scripts/getTextFromFile.js" type="text/javascript"></script>
|
2019-09-26 09:32:03 +02:00
|
|
|
<script src="/scripts/trueTypeOf.js" type="text/javascript"></script>
|
2019-08-22 15:23:52 +02:00
|
|
|
<script src="https://cdn.rawgit.com/larsgw/citation.js/archive/citation.js/citation-0.4.0-9.js" type="text/javascript"></script>
|
2019-09-05 12:59:54 +02:00
|
|
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
|
|
|
<script type="text/javascript" id="MathJax-script" async
|
|
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
|
2019-09-03 15:38:17 +02:00
|
|
|
</script>
|
2019-09-20 10:23:07 +02:00
|
|
|
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
2019-09-14 19:37:18 +02:00
|
|
|
{{< getDataFilesName >}}
|
2019-08-21 20:04:29 +02:00
|
|
|
<script>
|
2019-09-26 09:32:03 +02:00
|
|
|
window.onload=async function()
|
2019-09-14 19:37:18 +02:00
|
|
|
{
|
2019-09-26 09:32:03 +02:00
|
|
|
window.Cite = require('citation-js');
|
|
|
|
window.dats=await loadAllData()
|
|
|
|
window.data=new CombinedData()
|
|
|
|
molecules=new Set(Object.values(window.dats).flat().map((d)=>d.molecule))
|
|
|
|
molecules.forEach(el=>{
|
|
|
|
op=document.createElement("option")
|
|
|
|
op.value=el
|
|
|
|
op.innerText=el
|
|
|
|
document.getElementById("select_mol").appendChild(op)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
function select_mol_onchange(event){
|
|
|
|
update_mol(event.target.value)
|
|
|
|
}
|
|
|
|
function select_abs_onchange(event){
|
|
|
|
update_abs(window.dats["abs"][event.target.value])
|
|
|
|
}
|
|
|
|
function select_fluo_onchange(event){
|
|
|
|
update_fluo(window.dats["fluo"][event.target.value])
|
|
|
|
}
|
|
|
|
function select_ZPE_onchange(event){
|
|
|
|
update_ZPE(window.dats["ZPE"][event.target.value])
|
|
|
|
}
|
|
|
|
async function update_mol(molecule){
|
|
|
|
Object.keys(window.dats).forEach((key)=>{
|
|
|
|
var s=document.getElementById(String.raw`select_${key}`)
|
|
|
|
while (s.options[s.options.length-1].value!= "") {
|
|
|
|
s.options.remove(s.options[s.options.length-1])
|
|
|
|
}
|
|
|
|
window.dats[key].forEach(val=>{
|
|
|
|
if(val.molecule==molecule){
|
|
|
|
var op=document.createElement("option")
|
|
|
|
op.value=window.dats[key].indexOf(val)
|
|
|
|
op.innerText=val.method.toString()
|
|
|
|
s.appendChild(op)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
async function update_abs(abs){
|
|
|
|
window.data.Abs=abs
|
|
|
|
reload()
|
|
|
|
}
|
|
|
|
async function update_fluo(fluo){
|
|
|
|
window.data.Fluo=fluo
|
|
|
|
reload()
|
|
|
|
}
|
|
|
|
async function update_ZPE(ZPE){
|
|
|
|
window.data.ZPE=ZPE
|
|
|
|
reload()
|
2019-09-14 19:37:18 +02:00
|
|
|
}
|
|
|
|
async function update_file(file) {
|
2019-09-05 09:34:48 +02:00
|
|
|
var lnk_file=document.getElementById('lnk_file');
|
2019-09-10 14:37:44 +02:00
|
|
|
lnk_file.setAttribute('href',String.raw`view?dataFile=${file}`);
|
2019-09-05 11:31:38 +02:00
|
|
|
dat= await data.loadAsync(file);
|
2019-09-05 10:32:46 +02:00
|
|
|
await applyData(dat);
|
2019-08-22 11:00:58 +02:00
|
|
|
}
|
2019-09-26 09:32:03 +02:00
|
|
|
async function reload() {
|
2019-09-05 10:32:46 +02:00
|
|
|
const LatexInline=['\\(','\\)']
|
|
|
|
var par=document.getElementById("data_par")
|
2019-09-03 15:38:17 +02:00
|
|
|
par.innerHTML='';
|
|
|
|
var md=[];
|
|
|
|
var els=[];
|
2019-09-26 09:32:03 +02:00
|
|
|
var customRenderingProp=["excitations"]
|
|
|
|
for (const key of Object.keys(window.data)) {
|
|
|
|
if (window.data[key]!=null){
|
|
|
|
md.push(key)
|
|
|
|
for (const prop of Object.keys(window.data[key])) {
|
|
|
|
if(!(customRenderingProp.includes(prop)))
|
|
|
|
md.push([prop,window.data[key][prop]])
|
|
|
|
}
|
|
|
|
md.push(window.data[key].DOI)
|
|
|
|
}
|
2019-09-19 15:05:07 +02:00
|
|
|
}
|
|
|
|
div=document.getElementById("meta_div")
|
2019-09-20 11:16:41 +02:00
|
|
|
div.innerHTML=""
|
2019-09-26 09:32:03 +02:00
|
|
|
for (element of md) {
|
2019-09-19 15:05:07 +02:00
|
|
|
var node =null;
|
2019-09-26 09:32:03 +02:00
|
|
|
switch (trueTypeOf(element)) {
|
|
|
|
case "string":
|
|
|
|
node= document.createElement("h2");
|
|
|
|
node.innerText=element;
|
|
|
|
break;
|
|
|
|
case "doi":
|
|
|
|
var doi=element
|
|
|
|
var publi=await Cite.async(element.string)
|
|
|
|
var output = publi.format('bibliography', {
|
|
|
|
format: 'html',
|
|
|
|
template: 'apa',
|
|
|
|
lang: 'en-US'
|
|
|
|
})
|
|
|
|
node=document.createElement("a")
|
|
|
|
node.innerHTML=output
|
|
|
|
node.target='_blank'
|
|
|
|
node.href=element.url
|
|
|
|
break
|
|
|
|
case "Array":
|
|
|
|
k=element[0]
|
|
|
|
v=element[1]
|
|
|
|
k=k.charAt(0).toUpperCase() + k.slice(1)
|
|
|
|
node = document.createElement("div");
|
|
|
|
node.innerText= k+': '+v;
|
|
|
|
break;
|
2019-09-19 15:05:07 +02:00
|
|
|
}
|
|
|
|
div.appendChild(node);
|
2019-09-26 09:32:03 +02:00
|
|
|
}
|
2019-09-20 09:46:38 +02:00
|
|
|
var tb=document.getElementById("ex_table_b");
|
|
|
|
tb.innerHTML=''
|
2019-09-26 09:32:03 +02:00
|
|
|
window.data.excitations.forEach(el=> {
|
2019-09-19 15:05:07 +02:00
|
|
|
var row=document.createElement("tr")
|
|
|
|
var rowd=[]
|
2019-09-26 09:32:03 +02:00
|
|
|
rowd.push(String.raw`${LatexInline[0]} ${el.initial.toLaTeX()} \rightarrow ${el.final.toLaTeX()}${LatexInline[1]}`)
|
2019-09-19 18:54:23 +02:00
|
|
|
var e=[el.Eabs,el.Efluo,el.EZPE,el.Eadia,el.Ezz]
|
2019-09-19 15:05:07 +02:00
|
|
|
e.forEach((val)=>rowd.push(val.toFixed(2)))
|
|
|
|
rowd.forEach((d)=>{
|
|
|
|
td=document.createElement("td")
|
|
|
|
td.innerText=d
|
|
|
|
row.appendChild(td)
|
|
|
|
})
|
2019-09-20 09:46:38 +02:00
|
|
|
tb.appendChild(row)
|
2019-09-03 15:38:17 +02:00
|
|
|
});
|
2019-09-19 15:05:07 +02:00
|
|
|
await MathJax.typesetPromise();
|
|
|
|
document.getElementById("ex_div").hidden=false
|
2019-09-20 10:23:07 +02:00
|
|
|
var plotdat = [{
|
|
|
|
x: [],
|
|
|
|
y: [],
|
|
|
|
type: 'bar'
|
|
|
|
}];
|
2019-09-26 09:32:03 +02:00
|
|
|
var expAbsData= await AbsDataFile.loadAsync("/abs/"+window.data.Abs.molecule.toLowerCase()+"_exp.dat")
|
2019-09-20 10:23:07 +02:00
|
|
|
var i;
|
2019-09-26 09:32:03 +02:00
|
|
|
for (i = 0; i < window.data.excitations.length; i++) {
|
|
|
|
var ext=window.data.excitations[i];
|
|
|
|
var exexp=expAbsData.excitations[i]
|
|
|
|
plotdat[0].x.push(ext.final.toString())
|
|
|
|
plotdat[0].y.push(ext.Eabs-exexp.value)
|
2019-09-20 10:23:07 +02:00
|
|
|
}
|
|
|
|
await MathJax.typesetPromise();
|
2019-09-20 11:14:13 +02:00
|
|
|
var layout={title: "Absorption theory deviation"}
|
|
|
|
Plotly.newPlot('abs_plot', plotdat,layout);
|
2019-09-20 10:23:07 +02:00
|
|
|
document.getElementById("graph_div").hidden=false
|
2019-08-22 11:00:58 +02:00
|
|
|
}
|
2019-08-21 20:04:29 +02:00
|
|
|
</script>
|
|
|
|
<script>
|
2019-09-14 19:37:18 +02:00
|
|
|
function onValueChange(e) {
|
2019-09-05 09:34:48 +02:00
|
|
|
update_file(e.target.value);
|
2019-08-22 10:34:07 +02:00
|
|
|
}
|
2019-08-21 20:04:29 +02:00
|
|
|
</script>
|
2019-09-26 09:32:03 +02:00
|
|
|
<div>
|
|
|
|
<label>Select a molecule<br/>
|
|
|
|
<select id="select_mol" onchange="select_mol_onchange(event)">
|
|
|
|
<option value="" disabled=true selected=true>Select a molecule</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label>Select an absorption method<br/>
|
|
|
|
<select id="select_abs" onchange="select_abs_onchange(event)">
|
|
|
|
<option value="" disabled=true selected=true>Select an absorption method</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>Select a fluorescence method<br/>
|
|
|
|
<select id="select_fluo" onchange="select_fluo_onchange(event)">
|
|
|
|
<option value="" disabled=true selected=true>Select a fluorescence method</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>Select a ZPE method<br/>
|
|
|
|
<select id="select_ZPE" onchange="select_ZPE_onchange(event)">
|
|
|
|
<option value="" disabled=true selected=true>Select a ZPE method</option>
|
2019-09-14 19:37:18 +02:00
|
|
|
</select>
|
2019-09-26 09:32:03 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2019-09-05 15:26:50 +02:00
|
|
|
<h1>Data</h1>
|
2019-09-19 15:05:07 +02:00
|
|
|
<p id=data_par>
|
|
|
|
<div id="meta_div"></div>
|
|
|
|
<div id="ex_div" hidden=true>
|
2019-09-20 09:48:28 +02:00
|
|
|
<h2>Excitation</h2>
|
2019-09-19 15:05:07 +02:00
|
|
|
<table id="ex_table">
|
2019-09-20 09:46:38 +02:00
|
|
|
<thead>
|
2019-09-19 15:05:07 +02:00
|
|
|
<th>Transition</th>
|
2019-09-20 10:28:06 +02:00
|
|
|
<th>\(E_\text{abs}\)</th>
|
|
|
|
<th>\(E_\text{fluo}\)</th>
|
|
|
|
<th>\(\Delta E_\text{ZPE}\)</th>
|
|
|
|
<th>\(E_\text{adia}\)</th>
|
|
|
|
<th>\(E_\text{00}\)</th>
|
2019-09-20 09:46:38 +02:00
|
|
|
</thead>
|
|
|
|
<tbody id="ex_table_b">
|
|
|
|
|
|
|
|
</tbody>
|
2019-09-19 15:05:07 +02:00
|
|
|
</table>
|
|
|
|
</div>
|
2019-09-20 10:23:07 +02:00
|
|
|
<div id="graph_div" hidden=true>
|
|
|
|
<div id="abs_plot">
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-09-19 15:05:07 +02:00
|
|
|
</p>
|
2019-09-14 15:05:55 +02:00
|
|
|
<a target="_blank" id='lnk_file'>Go to file</a>
|