From bef9891db495142683d5bdfcd3bcb281c1ba1f49 Mon Sep 17 00:00:00 2001 From: salman Date: Sun, 14 Jun 2026 19:19:06 +0200 Subject: [PATCH] Fix bug extracting the energy value from the filename when there are too many '_'s --- TrimSPlib.js | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index 9220187..0a6e2d8 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -3886,15 +3886,42 @@ function plotProfiles(filenames) { win.document.close(); var plotDiv=win.document.getElementById("newPlot"); - // Extract energies from run files if available - var Es = []; - for (let i=0;i a.sortValue - b.sortValue); + // loop on sorted values and plot - for (let i=0;i