Add toolbar-level Add data set action to parameter plots
A new "Add data set..." button in the parameter-plot toolbar overlays the picked parameter-data files onto every panel at once, one palette colour per file, so a scan can be compared against the current one across the whole window without repeating the overlay step per panel. Overlaying no longer rewrites the panel's Y-axis label: it stays on the active panel's parameter instead of reverting to "Fit parameter". Docs and changelog updated.
This commit is contained in:
1 parent
398e282cfc
commit
23c2ed233f
6 files changed
+77
-3
No files matched your search
@@ -36,6 +36,11 @@ release path documented in [`TODO.md`](TODO.md).
|
||||
tools are provided by the server.
|
||||
|
||||
### Parameter plots
|
||||
- A toolbar-level **Add data set...** action overlays the picked parameter-data
|
||||
files onto every panel at once, with one palette colour per file, so a scan
|
||||
can be compared across the whole window without repeating the overlay step
|
||||
per panel. Overlaying no longer rewrites the panel's Y-axis label: it stays
|
||||
on the active panel's parameter instead of reverting to "Fit parameter".
|
||||
- Remembered parameter-plot configurations are no longer restored silently.
|
||||
The **Choose X axis** dialog now always appears, and a **Configuration**
|
||||
dropdown lists saved configurations whose parameter set matches the current
|
||||
|
||||
@@ -79,6 +79,15 @@ layout choice. Panels share the chosen X axis. The toolbar holds:
|
||||
* **Refresh** -- reread the current parameter-data file and redraw every
|
||||
visible panel. Use this after a new fit to update the numbers.
|
||||
* **Data...** -- change the data set loaded in the *active* panel.
|
||||
* **Add data set...** -- choose one or more parameter-data files and overlay
|
||||
them onto *every* panel at once. Each file keeps one colour from the
|
||||
:ref:`Palette`, and every panel plots the parameters it already shows for
|
||||
each newly added file, so a scan can be compared against the current one
|
||||
across the whole window with a distinct colour. The Y-axis label stays on
|
||||
the active panel's parameter rather than reverting to a generic label.
|
||||
Adding files this way is the same overlay mechanism as **Overlay data
|
||||
sets** in *Plot options*; the toolbar shortcut just applies the additions
|
||||
to all panels instead of the active one.
|
||||
* **Plot options** -- expand the layout, X, parameter, style, and displayed
|
||||
series controls for the active panel.
|
||||
|
||||
|
||||
+9
@@ -173,6 +173,15 @@ layout choice. Panels share the chosen X axis. The toolbar holds:</p>
|
||||
<li><p><strong>Refresh</strong> – reread the current parameter-data file and redraw every
|
||||
visible panel. Use this after a new fit to update the numbers.</p></li>
|
||||
<li><p><strong>Data…</strong> – change the data set loaded in the <em>active</em> panel.</p></li>
|
||||
<li><p><strong>Add data set…</strong> – choose one or more parameter-data files and overlay
|
||||
them onto <em>every</em> panel at once. Each file keeps one colour from the
|
||||
<span class="xref std std-ref">Palette</span>, and every panel plots the parameters it already shows for
|
||||
each newly added file, so a scan can be compared against the current one
|
||||
across the whole window with a distinct colour. The Y-axis label stays on
|
||||
the active panel’s parameter rather than reverting to a generic label.
|
||||
Adding files this way is the same overlay mechanism as <strong>Overlay data
|
||||
sets</strong> in <em>Plot options</em>; the toolbar shortcut just applies the additions
|
||||
to all panels instead of the active one.</p></li>
|
||||
<li><p><strong>Plot options</strong> – expand the layout, X, parameter, style, and displayed
|
||||
series controls for the active panel.</p></li>
|
||||
</ul>
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Search.setIndex({"alltitles":{"A first fit":[[7,"a-first-fit"]],"Command log":[[11,"command-log"]],"Configuration sharing":[[0,null]],"Constraints":[[1,null],[1,"id1"]],"Contents":[[4,null]],"Custom parameters":[[1,"custom-parameters"]],"Desktop installation":[[2,"desktop-installation"]],"Editing trace styles":[[8,"editing-trace-styles"]],"Example: couple the magnetic field to the Larmor frequency":[[1,"example-couple-the-magnetic-field-to-the-larmor-frequency"]],"Execution details":[[11,"execution-details"]],"File handling":[[6,"file-handling"]],"Fit and Plot":[[12,"fit-and-plot"]],"Fit model":[[12,"fit-model"]],"Fit options":[[12,"fit-options"]],"Fit or plot will not start":[[14,"fit-or-plot-will-not-start"]],"Fit range":[[12,"fit-range"]],"Fitted parameters look wrong or unchanged":[[14,"fitted-parameters-look-wrong-or-unchanged"]],"General notes":[[5,"general-notes"]],"Getting started":[[2,null]],"Glossary":[[3,null]],"Keyboard shortcuts":[[5,null],[8,"keyboard-shortcuts"]],"MSR editor":[[5,"msr-editor"],[6,null]],"Multi-group asymmetry fits":[[13,"multi-group-asymmetry-fits"]],"Notes":[[0,"notes"]],"On the desktop":[[0,"on-the-desktop"]],"On the web":[[0,"on-the-web"]],"Opening the web edition":[[2,"opening-the-web-edition"]],"Outcome dialog":[[11,"outcome-dialog"]],"Overlay data sets (multiple files in one panel)":[[8,"overlay-data-sets-multiple-files-in-one-panel"]],"Overview":[[7,null]],"Ownership: GUI or editor":[[6,"ownership-gui-or-editor"]],"Parameter plot hangs on \u201cPreparing plot files\u201d":[[14,"parameter-plot-hangs-on-preparing-plot-files"]],"Parameter plot is empty or missing data":[[14,"parameter-plot-is-empty-or-missing-data"]],"Parameter selection (Parameters tab)":[[5,"parameter-selection-parameters-tab"]],"Parameter-plot window":[[5,"parameter-plot-window"]],"Parameters and parameter plots":[[8,null]],"Per-run statistics":[[12,"per-run-statistics"]],"Plot options":[[8,"plot-options"]],"Preferences":[[10,null]],"Prerequisites":[[2,"prerequisites"]],"Preview":[[1,"preview"]],"Remembered plot configurations":[[8,"remembered-plot-configurations"]],"Reporting problems":[[14,"reporting-problems"]],"Restored configuration differs from the original machine":[[14,"restored-configuration-differs-from-the-original-machine"]],"Result files":[[11,"result-files"]],"Results and diagnostics":[[11,null]],"Run log window":[[11,"run-log-window"]],"Run selection":[[12,"run-selection"]],"Running the desktop app":[[2,"running-the-desktop-app"]],"Runs and fitting":[[12,null]],"Selecting parameters for plotting":[[8,"selecting-parameters-for-plotting"]],"Series fit actions":[[12,"series-fit-actions"]],"Some links start with a different prefix":[[14,"some-links-start-with-a-different-prefix"]],"Support":[[2,"support"]],"Template and series presets":[[8,"template-and-series-presets"]],"The Choose X axis dialog":[[8,"the-choose-x-axis-dialog"]],"The Quick Start guide":[[2,"the-quick-start-guide"]],"The Shared column":[[8,"the-shared-column"]],"The parameter table":[[8,"the-parameter-table"]],"The parameter-plot window":[[8,"the-parameter-plot-window"]],"The status bar":[[11,"the-status-bar"]],"Troubleshooting":[[14,null]],"Two editions":[[7,"two-editions"]],"Under the hood":[[7,"under-the-hood"]],"View settings":[[12,"view-settings"]],"Web and desktop editions":[[9,null]],"Web page cannot load data":[[14,"web-page-cannot-load-data"]],"What is shared":[[0,"what-is-shared"]],"What you get":[[7,"what-you-get"]],"Workflow":[[6,"workflow"]],"muSRFlow User Manual":[[4,null]],"t0 / background":[[13,null]],"\u201cNothing to fit\u201d":[[14,"nothing-to-fit"]]},"docnames":["configuration-sharing","constraints","getting-started","glossary","index","keyboard-shortcuts","msr-editor","overview","parameters-plots","platforms","preferences","results-diagnostics","runs-fitting","t0-background","troubleshooting"],"envversion":{"sphinx":65,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2},"filenames":["configuration-sharing.rst","constraints.rst","getting-started.rst","glossary.rst","index.rst","keyboard-shortcuts.rst","msr-editor.rst","overview.rst","parameters-plots.rst","platforms.rst","preferences.rst","results-diagnostics.rst","runs-fitting.rst","t0-background.rst","troubleshooting.rst"],"indexentries":{},"objects":{},"objnames":{},"objtypes":{},"terms":{"":[0,3,5,6,8,10,12,13,14],"0":12,"01":12,"012":11,"1":[8,11,12,13],"100":12,"101":13,"103":13,"12":12,"16":12,"1998":12,"2":[8,12,13],"21":12,"24":12,"25":12,"3":[8,12,13],"4":[12,13],"5":12,"514":[3,12],"515":[3,12],"516":12,"520":12,"525":12,"540":12,"7":12,"8":12,"A":[0,1,3,4,8,10,11,12,13,14],"For":[2,6,8,11,12,13],"If":[0,4,8,11,12,14],"In":[5,7,8,14],"It":[0,1,4,6,7,11],"Its":[5,7],"On":[2,3,4,6,7,9,11,12,14],"One":[3,12],"The":[0,1,3,4,5,6,7,9,10,12,13,14],"ThenLine truncated
|
||||
Search.setIndex({"alltitles":{"A first fit":[[7,"a-first-fit"]],"Command log":[[11,"command-log"]],"Configuration sharing":[[0,null]],"Constraints":[[1,null],[1,"id1"]],"Contents":[[4,null]],"Custom parameters":[[1,"custom-parameters"]],"Desktop installation":[[2,"desktop-installation"]],"Editing trace styles":[[8,"editing-trace-styles"]],"Example: couple the magnetic field to the Larmor frequency":[[1,"example-couple-the-magnetic-field-to-the-larmor-frequency"]],"Execution details":[[11,"execution-details"]],"File handling":[[6,"file-handling"]],"Fit and Plot":[[12,"fit-and-plot"]],"Fit model":[[12,"fit-model"]],"Fit options":[[12,"fit-options"]],"Fit or plot will not start":[[14,"fit-or-plot-will-not-start"]],"Fit range":[[12,"fit-range"]],"Fitted parameters look wrong or unchanged":[[14,"fitted-parameters-look-wrong-or-unchanged"]],"General notes":[[5,"general-notes"]],"Getting started":[[2,null]],"Glossary":[[3,null]],"Keyboard shortcuts":[[5,null],[8,"keyboard-shortcuts"]],"MSR editor":[[5,"msr-editor"],[6,null]],"Multi-group asymmetry fits":[[13,"multi-group-asymmetry-fits"]],"Notes":[[0,"notes"]],"On the desktop":[[0,"on-the-desktop"]],"On the web":[[0,"on-the-web"]],"Opening the web edition":[[2,"opening-the-web-edition"]],"Outcome dialog":[[11,"outcome-dialog"]],"Overlay data sets (multiple files in one panel)":[[8,"overlay-data-sets-multiple-files-in-one-panel"]],"Overview":[[7,null]],"Ownership: GUI or editor":[[6,"ownership-gui-or-editor"]],"Parameter plot hangs on \u201cPreparing plot files\u201d":[[14,"parameter-plot-hangs-on-preparing-plot-files"]],"Parameter plot is empty or missing data":[[14,"parameter-plot-is-empty-or-missing-data"]],"Parameter selection (Parameters tab)":[[5,"parameter-selection-parameters-tab"]],"Parameter-plot window":[[5,"parameter-plot-window"]],"Parameters and parameter plots":[[8,null]],"Per-run statistics":[[12,"per-run-statistics"]],"Plot options":[[8,"plot-options"]],"Preferences":[[10,null]],"Prerequisites":[[2,"prerequisites"]],"Preview":[[1,"preview"]],"Remembered plot configurations":[[8,"remembered-plot-configurations"]],"Reporting problems":[[14,"reporting-problems"]],"Restored configuration differs from the original machine":[[14,"restored-configuration-differs-from-the-original-machine"]],"Result files":[[11,"result-files"]],"Results and diagnostics":[[11,null]],"Run log window":[[11,"run-log-window"]],"Run selection":[[12,"run-selection"]],"Running the desktop app":[[2,"running-the-desktop-app"]],"Runs and fitting":[[12,null]],"Selecting parameters for plotting":[[8,"selecting-parameters-for-plotting"]],"Series fit actions":[[12,"series-fit-actions"]],"Some links start with a different prefix":[[14,"some-links-start-with-a-different-prefix"]],"Support":[[2,"support"]],"Template and series presets":[[8,"template-and-series-presets"]],"The Choose X axis dialog":[[8,"the-choose-x-axis-dialog"]],"The Quick Start guide":[[2,"the-quick-start-guide"]],"The Shared column":[[8,"the-shared-column"]],"The parameter table":[[8,"the-parameter-table"]],"The parameter-plot window":[[8,"the-parameter-plot-window"]],"The status bar":[[11,"the-status-bar"]],"Troubleshooting":[[14,null]],"Two editions":[[7,"two-editions"]],"Under the hood":[[7,"under-the-hood"]],"View settings":[[12,"view-settings"]],"Web and desktop editions":[[9,null]],"Web page cannot load data":[[14,"web-page-cannot-load-data"]],"What is shared":[[0,"what-is-shared"]],"What you get":[[7,"what-you-get"]],"Workflow":[[6,"workflow"]],"muSRFlow User Manual":[[4,null]],"t0 / background":[[13,null]],"\u201cNothing to fit\u201d":[[14,"nothing-to-fit"]]},"docnames":["configuration-sharing","constraints","getting-started","glossary","index","keyboard-shortcuts","msr-editor","overview","parameters-plots","platforms","preferences","results-diagnostics","runs-fitting","t0-background","troubleshooting"],"envversion":{"sphinx":65,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2},"filenames":["configuration-sharing.rst","constraints.rst","getting-started.rst","glossary.rst","index.rst","keyboard-shortcuts.rst","msr-editor.rst","overview.rst","parameters-plots.rst","platforms.rst","preferences.rst","results-diagnostics.rst","runs-fitting.rst","t0-background.rst","troubleshooting.rst"],"indexentries":{},"objects":{},"objnames":{},"objtypes":{},"terms":{"":[0,3,5,6,8,10,12,13,14],"0":12,"01":12,"012":11,"1":[8,11,12,13],"100":12,"101":13,"103":13,"12":12,"16":12,"1998":12,"2":[8,12,13],"21":12,"24":12,"25":12,"3":[8,12,13],"4":[12,13],"5":12,"514":[3,12],"515":[3,12],"516":12,"520":12,"525":12,"540":12,"7":12,"8":12,"A":[0,1,3,4,8,10,11,12,13,14],"For":[2,6,8,11,12,13],"If":[0,4,8,11,12,14],"In":[5,7,8,14],"It":[0,1,4,6,7,11],"Its":[5,7],"On":[2,3,4,6,7,9,11,12,14],"One":[3,12],"The":[0,1,3,4,5,6,7,9,10,12,13,14],"ThenLine truncated
|
||||
@@ -79,6 +79,15 @@ layout choice. Panels share the chosen X axis. The toolbar holds:
|
||||
* **Refresh** -- reread the current parameter-data file and redraw every
|
||||
visible panel. Use this after a new fit to update the numbers.
|
||||
* **Data...** -- change the data set loaded in the *active* panel.
|
||||
* **Add data set...** -- choose one or more parameter-data files and overlay
|
||||
them onto *every* panel at once. Each file keeps one colour from the
|
||||
:ref:`Palette`, and every panel plots the parameters it already shows for
|
||||
each newly added file, so a scan can be compared against the current one
|
||||
across the whole window with a distinct colour. The Y-axis label stays on
|
||||
the active panel's parameter rather than reverting to a generic label.
|
||||
Adding files this way is the same overlay mechanism as **Overlay data
|
||||
sets** in *Plot options*; the toolbar shortcut just applies the additions
|
||||
to all panels instead of the active one.
|
||||
* **Plot options** -- expand the layout, X, parameter, style, and displayed
|
||||
series controls for the active panel.
|
||||
|
||||
|
||||
+44
-2
@@ -1442,6 +1442,12 @@ function showMusrfitParameterPlotWindow(parameterPath, jobName = "", preferredPa
|
||||
dataButton.textContent = "Data...";
|
||||
dataButton.title = "Load a parameter-data file into the selected panel";
|
||||
|
||||
let addAllDataSetButton = document.createElement("button");
|
||||
addAllDataSetButton.type = "button";
|
||||
addAllDataSetButton.className = "parameter-plot-add-data-set parameter-plot-add-all-data-sets";
|
||||
addAllDataSetButton.textContent = "Add data set...";
|
||||
addAllDataSetButton.title = "Overlay a parameter-data file onto every panel, one colour per data set";
|
||||
|
||||
optionsButton.type = "button";
|
||||
optionsButton.className = "view-settings-toggle parameter-plot-options-toggle";
|
||||
optionsButton.textContent = "Plot options";
|
||||
@@ -1574,7 +1580,7 @@ function showMusrfitParameterPlotWindow(parameterPath, jobName = "", preferredPa
|
||||
message.className = "web-root-message parameter-plot-message";
|
||||
message.textContent = "Loading parameter data...";
|
||||
|
||||
for (let control of [refreshButton, dataButton, optionsButton]) toolbar.appendChild(control);
|
||||
for (let control of [refreshButton, dataButton, addAllDataSetButton, optionsButton]) toolbar.appendChild(control);
|
||||
for (let control of [layoutLabel, panelIndicator, dataSourceLabel, xLabel, addLabel, addButton,
|
||||
modeLabel, paletteLabel, xTitleLabel, yTitleLabel, templateLabel, dataSetsSection, forgetButton, seriesList]) optionsPanel.appendChild(control);
|
||||
content.appendChild(toolbar);
|
||||
@@ -2009,7 +2015,9 @@ function showMusrfitParameterPlotWindow(parameterPath, jobName = "", preferredPa
|
||||
? panel.xTitle.trim() : musrfitParameterAxisLabel(panel.dataset.columns[xIndex]);
|
||||
let yAxisTitle = panel.yTitle && panel.yTitle.trim()
|
||||
? panel.yTitle.trim()
|
||||
: (traces.length === 1 ? traces[0].name : "Fit parameter");
|
||||
: (traces.length === 1
|
||||
? traces[0].name
|
||||
: musrfitParameterAxisLabel(panel.yNames[0] || ""));
|
||||
let layout = {
|
||||
autosize: true,
|
||||
margin: compact ? { l: 58, r: 14, t: 10, b: 48 } : { l: 75, r: 24, t: 24, b: 65 },
|
||||
@@ -2692,6 +2700,40 @@ function showMusrfitParameterPlotWindow(parameterPath, jobName = "", preferredPa
|
||||
}
|
||||
});
|
||||
|
||||
// Toolbar-level "Add data set..." overlays the picked files onto every
|
||||
// panel at once. Each file gets one colour from the palette and every panel
|
||||
// plots the same parameters it already shows, so adding a scan compares it
|
||||
// against the current one across the whole window with a distinct colour.
|
||||
addAllDataSetButton.addEventListener("click", async function() {
|
||||
let panel = panelStates[activePanelIndex];
|
||||
if (!panel) return;
|
||||
addAllDataSetButton.disabled = true;
|
||||
try {
|
||||
let sources = await chooseParameterDataSources(panel);
|
||||
for (let source of sources) {
|
||||
let entry = registerParameterDataSet(registeredDataSets, source, dataSetColorCounter++);
|
||||
for (let state of panelStates) {
|
||||
if (!state.overlays.includes(entry.key)) state.overlays.push(entry.key);
|
||||
}
|
||||
try {
|
||||
await loadDataSetEntry(entry);
|
||||
} catch (error) {
|
||||
entry.dataset = null;
|
||||
entry.error = error && error.message ? error.message : String(error);
|
||||
}
|
||||
}
|
||||
redrawVisiblePanels();
|
||||
syncToolbarFromActivePanel();
|
||||
message.textContent = "";
|
||||
scheduleParameterPlotStateSave();
|
||||
} catch (error) {
|
||||
message.className = "web-root-message web-root-error parameter-plot-message";
|
||||
message.textContent = error && error.message ? error.message : String(error);
|
||||
} finally {
|
||||
addAllDataSetButton.disabled = false;
|
||||
}
|
||||
});
|
||||
|
||||
let source = parameterPath;
|
||||
if (source.kind === "path" && !source.label) {
|
||||
source = {
|
||||
|
||||
Reference in new issue
Block a user