diff --git a/content/multipledataset.html b/content/multipledataset.html index 1b13cf45..8e711f08 100644 --- a/content/multipledataset.html +++ b/content/multipledataset.html @@ -236,7 +236,7 @@ draft: false var refstr = $("#sel_ref option:selected").val() var sdatdic = new Map() for (const d of window.filtData) { - const key = JSON.stringify([d.code, d.method, d.DOI.string]) + const key = JSON.stringify([d.method, d.DOI.string]) if (!(sdatdic.has(key))) { sdatdic.set(key, new Map()) } @@ -265,74 +265,69 @@ draft: false for (const [keystr, vals] of sdic) { row = $("") key = JSON.parse(keystr) - key.shift() Reflect.setPrototypeOf(key[0], method.prototype) //Reflect.setPrototypeOf(key[1], DOI.prototype) - for (const [i, el] of key.entries()) { - var td = $("") - if (i === 1) { - var publi = doiCache.get(el, true) - const sets = await getSets() - if (sets.has(el)) { - var str = sets.get(el) - $(td).append(str) - } - $("", { - href: new DOI(el).url, - target: "_blank" - }).html(publi.format('citation', { - format: 'html', - lang: 'en-US' - })).appendTo(td) - } - else { - $(td).text(el) - } - $(row).append(td) + th = $("", { scope: "column" }) + const [meth, doi] = key + th.clone().text(meth.toString("\n").split('-').join('\u2011')).appendTo(row) + var thdoi = th.clone() + var publi = doiCache.get(doi, true) + const sets = await getSets() + if (sets.has(doi)) { + var str = sets.get(doi) + $(thdoi).append(str + " ") } - const noNanVals = (vals.every((v) => Number.isNaN(v))) ? vals : (vals.filter((v) => !Number.isNaN(v))) - const avals = noNanVals.map(v => Math.abs(v)) - for (const val of [ss.min(noNanVals), ss.max(noNanVals), ss.mean(noNanVals), ss.mean(avals), ss.median(noNanVals), ss.median(avals), ss.rootMeanSquare(noNanVals), ss.variance(noNanVals), ss.standardDeviation(noNanVals)]) { - $("").text(noNanFixed(val, 2)).appendTo(row) + $("", { + href: new DOI(doi).url, + target: "_blank" + }).html(publi.format('citation', { + format: 'html', + lang: 'en-US' + })).appendTo(thdoi) + $(row).append(thdoi) + const noNanVals = (vals.every((v) => Number.isNaN(v))) ? vals : (vals.filter((v) => !Number.isNaN(v))) + const avals = noNanVals.map(v => Math.abs(v)) + for (const val of [ss.min(noNanVals), ss.max(noNanVals), ss.mean(noNanVals), ss.mean(avals), ss.median(noNanVals), ss.median(avals), ss.rootMeanSquare(noNanVals), ss.variance(noNanVals), ss.standardDeviation(noNanVals)]) { + $("").text(noNanFixed(val, 2)).appendTo(row) + } + $(stb).append(row) + var box = { + x: noNanVals, + amean: ss.mean(avals).toFixed(3), + name: key[0].toString() + " MAD : " + ss.mean(avals).toPrecision(4), + type: 'box', + boxmean: 'sd' + }; + graphdat.push(box) + } + var layout = { + paper_bgcolor: 'rgba(0,0,0,0)', + plot_bgcolor: 'rgba(0,0,0,0)', + gap: 0, + legend: { + traceorder: 'reversed', + }, + xaxis: { + title: { + text: 'Energy (eV)', } - $(stb).append(row) - var box = { - x: noNanVals, - amean: ss.mean(avals).toFixed(3), - name: key[0].toString() + " MAD : " + ss.mean(avals).toPrecision(4), - type: 'box', - boxmean: 'sd' - }; - graphdat.push(box) - } - var layout = { - paper_bgcolor: 'rgba(0,0,0,0)', - plot_bgcolor: 'rgba(0,0,0,0)', - gap: 0, - legend: { - traceorder: 'reversed', - }, - xaxis: { - title: { - text: 'Energy (eV)', - } - }, - bgcolor: '#E2E2E2', - bordercolor: '#FFFFFF', - borderwidth: 2, - // autosize: false, - width: 850, - height: 500, - margin: { - l: 0, - r: 10, - b: 15, - t: 20, - pad: 0, - }, - } - Plotly.newPlot('graph_div', graphdat, layout); - processingIndicator.isActive = false + }, + bgcolor: '#E2E2E2', + bordercolor: '#FFFFFF', + borderwidth: 2, + // autosize: false, + width: 850, + height: 500, + margin: { + l: 0, + r: 10, + b: 15, + t: 20, + pad: 0, + }, + } + Plotly.newPlot('graph_div', graphdat, layout); + processingIndicator.isActive = false } async function reloadContent() { window.filterParams = [$("#cb_unsafe").prop("checked"), Array.from(Array.from($("#cb_exTypeList>li>input[type=checkbox]:checked")).map(el => parseInt(el.value))).reduce((pv, cv) => pv + cv, 0), Array.from(Array.from($("#cb_exVertKindList>li>input[type=checkbox]:checked")).map(el => parseInt(el.value))).reduce((pv, cv) => pv + cv, 0)] @@ -353,11 +348,11 @@ draft: false }) await window.doiCache.addRange(window.filtData.map((d) => d.DOI.string)) $(sel_ref).empty() - for (const el of uniq(window.filtData.map(d => [d.code, d.method, d.DOI.string]))) { + for (const el of uniq(window.filtData.map(d => [d.method, d.DOI.string]))) { op = $("