10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 22:03:49 +01:00
QUESTDB_website/content/onedataset.html

188 lines
6.4 KiB
HTML
Raw Normal View History

---
title: "One dataset"
date: 2019-08-29 09:00
draft: false
---
<link rel="stylesheet" type="text/css" href="/css/modal.css" />
<script src="/js/processingIndicator.js" type="text/javascript"></script>
<script src="/js/data.js" type="text/javascript"></script>
<script src="/js/loadAllData.js" type="text/javascript"></script>
<script src="/js/getFullDataPath.js" type="text/javascript"></script>
<script src="/js/getTextFromFile.js" type="text/javascript"></script>
<script src="/js/trueTypeOf.js" type="text/javascript"></script>
<script src="/js/noNan.js"></script>
<script src="/js/websiteFile.js"></script>
{{< getDataFilesName >}}
2019-08-21 20:04:29 +02:00
<script>
2019-09-26 09:32:03 +02:00
window.onload=async function()
{
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))
for (const el of molecules) {
2019-10-09 17:53:10 +02:00
$("<option/>",{value:el}).text(el).appendTo($("#select_mol"))
}
2019-09-26 09:32:03 +02:00
}
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){
processingIndicator.isActive=true
for (const [key,dat] of Object.entries(window.dats)) {
2019-10-09 17:53:10 +02:00
var s=$(String.raw`#select_${key}`)
$(s).find('option[value!=""]').remove()
$(s).find('option[value=""]').first().prop('selected', true)
dat.forEach((val,index)=>{
2019-09-26 09:32:03 +02:00
if(val.molecule==molecule){
2019-10-09 17:53:10 +02:00
$("<option/>",{value:index}).text(val.method.toString()).appendTo(s)
2019-09-26 09:32:03 +02:00
}
})
}
processingIndicator.isActive=false
2019-09-26 09:32:03 +02:00
}
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()
}
async function clear(){
2019-10-09 17:53:10 +02:00
$("#ex_table > tbody,data_par").each(()=>{
$(this).empty()
})
}
2019-09-26 09:32:03 +02:00
async function reload() {
processingIndicator.isActive=true
clear()
2019-09-05 10:32:46 +02:00
const LatexInline=['\\(','\\)']
2019-09-03 15:38:17 +02:00
var md=[];
var els=[];
2019-09-30 10:53:13 +02:00
var customRenderingProp=["excitations","sourceFile"]
2019-09-26 09:32:03 +02:00
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-30 10:53:13 +02:00
md.push(window.data[key].sourceFile)
2019-09-26 09:32:03 +02:00
}
2019-09-19 15:05:07 +02:00
}
2019-10-09 17:53:10 +02:00
div=$("#meta_div")
$(div).empty()
for (const element of md) {
2019-09-26 09:32:03 +02:00
switch (trueTypeOf(element)) {
case "string":
2019-10-09 17:53:10 +02:00
$("<h2/>").text(element).appendTo(div)
2019-09-26 09:32:03 +02:00
break;
case "doi":
var publi=await Cite.async(element.string)
var output = publi.format('bibliography', {
format: 'html',
template: 'apa',
lang: 'en-US'
})
2019-10-09 17:53:10 +02:00
$("<a/>",{
href:element.url,
target:"_blank"}).html(output).appendTo(div)
2019-09-26 09:32:03 +02:00
break
2019-09-30 10:53:13 +02:00
case "websiteFile":
2019-10-09 17:53:10 +02:00
$("<a/>",{href:element.url,
target:"_blank",
href: element.getViewerURL()
}).text("Go to file").appendTo(div)
2019-09-30 10:53:13 +02:00
break
2019-09-26 09:32:03 +02:00
case "Array":
k=element[0]
v=element[1]
k=k.charAt(0).toUpperCase() + k.slice(1)
2019-10-09 17:53:10 +02:00
$("<div/>").text(k+': '+v).appendTo(div)
2019-09-26 09:32:03 +02:00
break;
2019-09-19 15:05:07 +02:00
}
2019-09-26 09:32:03 +02:00
}
2019-10-09 17:53:10 +02:00
var tb=$("#ex_table > tbody");
$(tb).empty()
for (const el of window.data.excitations) {
2019-10-09 17:53:10 +02:00
row=$("<tr/>")
2019-09-19 15:05:07 +02:00
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]
e.forEach((val)=>rowd.push(noNanPrecision(val,3)))
for(d of rowd) {
2019-10-09 17:53:10 +02:00
$("<td/>").text(d).appendTo(row)
}
2019-10-09 17:53:10 +02:00
tb.append(row)
}
2019-09-19 15:05:07 +02:00
await MathJax.typesetPromise();
2019-10-09 17:53:10 +02:00
$("#ex_div").attr("hidden",false)
2019-09-20 10:23:07 +02:00
await MathJax.typesetPromise();
processingIndicator.isActive=false
}
2019-08-21 20:04:29 +02:00
</script>
<p>
2019-10-03 10:48:37 +02:00
In this page you can calculate \(E_\text{adia}\) \(E_\text{0-0}\) from \(E_\text{abs}\) \(E_\text{fluo}\) and \(\Delta E_\text{ZPE}\)
For this select a method for absorption, fluorescence or ZPE
</p>
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>
</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>
2019-10-03 10:48:37 +02:00
<th>\(E_\text{0-0}\)</th>
2019-09-20 09:46:38 +02:00
</thead>
2019-10-09 17:53:10 +02:00
<tbody></tbody>
2019-09-19 15:05:07 +02:00
</table>
</div>
</p>
{{< waitModal >}}