10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 05:03:53 +01:00
This commit is contained in:
scemama 2020-12-11 09:45:33 +00:00
parent 46f610ea71
commit d1f6229d84
2 changed files with 22 additions and 11 deletions

View File

@ -59,7 +59,7 @@
"headline": "Dataset", "headline": "Dataset",
"description" : "function adjustSticky() { const height = $(\u0022nav\u0022).height() $(\u0022thead.sticky tr th \u0022).css(\u0022top\u0022, height) } window.onload = async () = { window.browser = bowser.getParser(window.navigator.userAgent); $(\u0022input[type=\u0027checkbox\u0027]\u0022).trigger(\u0022change\u0022) $(\u0022input[type=\u0027number\u0027].range\u0022).trigger(\u0022change\u0022) adjustSticky(); $(window).resize(adjustSticky) var slist = $(\u0022#SelectList\u0022) getAllSelect().each(function () { $(\u0022\u0022).text($(\u0027label[for=\u0022\u0027 \u002b $(this).attr(\u0027id\u0027) \u002b \u0027\u0022]\u0027).text()).appendTo(slist) }) $(\u0027[data-needbrowser],[data-neednotbrowser]\u0027).each(function () { function test(key, value) { switch (key) { case \u0022", "description" : "function adjustSticky() { const height = $(\u0022nav\u0022).height() $(\u0022thead.sticky tr th \u0022).css(\u0022top\u0022, height) } window.onload = async () = { window.browser = bowser.getParser(window.navigator.userAgent); $(\u0022input[type=\u0027checkbox\u0027]\u0022).trigger(\u0022change\u0022) $(\u0022input[type=\u0027number\u0027].range\u0022).trigger(\u0022change\u0022) adjustSticky(); $(window).resize(adjustSticky) var slist = $(\u0022#SelectList\u0022) getAllSelect().each(function () { $(\u0022\u0022).text($(\u0027label[for=\u0022\u0027 \u002b $(this).attr(\u0027id\u0027) \u002b \u0027\u0022]\u0027).text()).appendTo(slist) }) $(\u0027[data-needbrowser],[data-neednotbrowser]\u0027).each(function () { function test(key, value) { switch (key) { case \u0022",
"inLanguage" : "en", "inLanguage" : "en",
"wordCount": 2224 , "wordCount": 2247 ,
"datePublished" : "0001-01-01T00:00:00", "datePublished" : "0001-01-01T00:00:00",
"dateModified" : "0001-01-01T00:00:00", "dateModified" : "0001-01-01T00:00:00",
"image" : "https:\/\/lcpq.github.io\/QUESTDB_website\/img\/TOC_JPCL.png", "image" : "https:\/\/lcpq.github.io\/QUESTDB_website\/img\/TOC_JPCL.png",
@ -464,16 +464,28 @@ MathJax.Hub.Config({
} }
async function reloadCustomFiles() { async function reloadCustomFiles() {
processingIndicator.isActive = true processingIndicator.isActive = true
window.dats = window.defaultDats; window.customDats = []
window.dats = window.defaultDats
const kinds = new Map([["file_abs", VertExcitationKinds.Absorbtion], ["file_fluo", VertExcitationKinds.Fluorescence]]) const kinds = new Map([["file_abs", VertExcitationKinds.Absorbtion], ["file_fluo", VertExcitationKinds.Fluorescence]])
for (const el of $('#form_dat > fieldset > fieldset > div > input[type="file"')) { for (const el of $('#form_dat > fieldset > fieldset > div > input[type="file"')) {
if (kinds.has(el.name)) { if (kinds.has(el.name)) {
const kind=kinds.get(el.name)
for (const f of el.files) { for (const f of el.files) {
const dat = await VertDataFile.loadAsync(f, kinds.get(this.name)) const dat = await VertDataFile.loadAsync(f, kind)
window.dats.push(dat) window.customDats.push(dat)
} }
} }
} }
for (const defdat of window.defaultDats) {
if (defdat.method.isTBE) {
for (const custdat of window.customDats) {
if (custdat.molecule===defdat.molecule) {
custdat.CopyExcitationsTypeFrom(defdat)
}
}
}
}
window.dats=window.defaultDats.concat(window.customDats)
processingIndicator.isActive = false processingIndicator.isActive = false
reloadSizeSelector() reloadSizeSelector()
reloadSelect("sets") reloadSelect("sets")
@ -635,7 +647,7 @@ MathJax.Hub.Config({
if (!(sdatdic.has(key))) { if (!(sdatdic.has(key))) {
sdatdic.set(key, new Map()) sdatdic.set(key, new Map())
} }
const myT1s = T1ref.get(SetName).get(d.molecule) const myT1s = T1ref.get(d.molecule)
for (const exc of d.excitations) { for (const exc of d.excitations) {
var allowT1 = false var allowT1 = false
const T1Key = JSON.stringify((exc.initial, exc.final)) const T1Key = JSON.stringify((exc.initial, exc.final))
@ -776,10 +788,9 @@ MathJax.Hub.Config({
publiCache.set(DOI,await PubliData.loadAsync(DOI)) publiCache.set(DOI,await PubliData.loadAsync(DOI))
} }
const setName = exSet.name const setName = exSet.name
window.T1ref.set(setName, new Map())
for (const mol of mols) { for (const mol of mols) {
window.T1ref.get(setName).set(mol, new Map()) window.T1ref.set(mol, new Map())
var TBESortdat = window.dats.filter((d)=>exSet.name === d.set.name && d.molecule === mol).sort((d1, d2) => { var TBESortdat = window.dats.filter((d)=> d.molecule === mol).sort((d1, d2) => {
if (d1.method.isTBE && !d2.method.isTBE) { if (d1.method.isTBE && !d2.method.isTBE) {
return -1 return -1
} else if (!d1.method.isTBE && d2.method.isTBE) { } else if (!d1.method.isTBE && d2.method.isTBE) {
@ -797,7 +808,7 @@ MathJax.Hub.Config({
}) })
if (TBESortdat.length > 0 && TBESortdat[0].method.isTBE) { if (TBESortdat.length > 0 && TBESortdat[0].method.isTBE) {
for (const exc of TBESortdat[0].excitations) { for (const exc of TBESortdat[0].excitations) {
window.T1ref.get(setName).get(mol).set(JSON.stringify((exc.initial, exc.final)), exc.T1) window.T1ref.get(mol).set(JSON.stringify((exc.initial, exc.final)), exc.T1)
} }
} }
} }
@ -870,7 +881,7 @@ MathJax.Hub.Config({
for (const dat of paperdata) { for (const dat of paperdata) {
const setName = dat.set.name const setName = dat.set.name
const key1 = dat.molecule; const key1 = dat.molecule;
const myT1s = T1ref.get(setName).get(dat.molecule) const myT1s = T1ref.get(dat.molecule)
if (!datadic.has(key1)) { if (!datadic.has(key1)) {
datadic.set(key1, new Map()) datadic.set(key1, new Map())
} }

View File

@ -203,7 +203,7 @@ class excitationBase {
this.type.Value = excitationTypes.Others.Value; this.type.Value = excitationTypes.Others.Value;
} }
else if (!(this.type & (excitationTypes.Single.Value | excitationTypes.Double.Value))){ else if (!(this.type & (excitationTypes.Single.Value | excitationTypes.Double.Value))){
this.type.Value = excitationTypes.Single this.type.Value += excitationTypes.Single.Value
} }
this.T1 = T1 this.T1 = T1
} }