Show version, edition, Git revision, runtime provider, musrfit, and ROOT in Quick Start across Electron and web deployments. Embed source provenance in Linux and Windows packages, repair the hardened help-window IPC path, and make Plotly controls toggle consistently by tap or click.
141 lines
9.2 KiB
HTML
141 lines
9.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>muSRFlow Quick Start</title>
|
|
<link rel="stylesheet" href="ZGUI.css">
|
|
</head>
|
|
<body class="quick-start-document">
|
|
<main class="quick-start-body" id="quickStartBody">
|
|
<section class="quick-start-section" id="helpRuns">
|
|
<h3>Runs and fitting</h3>
|
|
<ol>
|
|
<li>Select the instrument and year, then enter one or more runs.</li>
|
|
<li>Choose the fit type and add the theory components you need.</li>
|
|
<li>Use <b>Fit</b> to generate and fit the MSR, or <b>Plot</b> to inspect the spectra with musrview.</li>
|
|
</ol>
|
|
<p>When an independent series fit (two or more runs, no shared parameters) is eligible, the <b>Fit options</b> row adds an action chip per run. Click a chip to cycle it: <b>reuse</b> keeps the existing fit, <b>refit</b> rebuilds the MSR from the live GUI parameters, and <b>skip</b> leaves the run untouched. The <b>All</b> dropdown sets every chip at once from <b>Reuse all</b>, <b>Refit all</b>, or <b>Skip all</b>.</p>
|
|
<p>Plot, FFT and RRF settings are available from their compact option tickets. Plot options include independent time and Y-axis ranges; leaving a pair empty selects automatic limits. In Electron, machine-specific paths, output suffixes and automatic initial-parameter guessing are under <b>File → Preferences</b>.</p>
|
|
</section>
|
|
|
|
<section class="quick-start-section" id="helpParams">
|
|
<h3>Parameters and parameter plots</h3>
|
|
<p>Edit value, step and limits directly in the table. Once populated, the table is the source of the starting values used for fitting.</p>
|
|
<p>In a multi-run fit the table also has a <b>Shared</b> column: tick a parameter to keep a single shared starting value, step and limits for all runs instead of a separate per-run copy. Sharing any parameter takes the fit out of the independent-series route, so per-run refit/skip control is hidden; the parameter plot still works.</p>
|
|
<p>Click a parameter name to select or deselect it. Ctrl/Cmd-click adds individual parameters and Shift-click selects a range. Then choose <b>Plot parameters...</b> and select the common X axis.</p>
|
|
<p>In the parameter-plot window, <b>Refresh</b> rereads the current result file, <b>Data...</b> changes the data set for the active panel, and <b>Plot options</b> controls panel layout, X axis, style and displayed parameters. Click a panel before changing its panel-specific settings.</p>
|
|
</section>
|
|
|
|
<section class="quick-start-section" id="helpConstraints">
|
|
<h3>Constraints</h3>
|
|
<p>Use this tab to add fit functions and parameter constraints that are not represented by the main theory controls. Define any custom values first in <b>Custom parameters</b>, then express the dependency under <b>Constraints</b>. Changes are included the next time the MSR is generated.</p>
|
|
<p><i>Example:</i> couple the magnetic field to the Larmor frequency. Add a custom parameter named <b>Bfield</b> in <b>Custom parameters</b>. Then under <b>Constraints</b>, choose <b>Frq</b> from the <b>Parameter</b> dropdown, type <b>gamma_mu * Bfield</b> into the <b>Function</b> field, and press <b>Add</b>.</p>
|
|
</section>
|
|
|
|
<section class="quick-start-section" id="helpT0Bg">
|
|
<h3>t<sub>0</sub> / background</h3>
|
|
<p>Use these expert controls when detector timing or background handling needs to differ from the normal defaults. Leave them unchanged for standard fits.</p>
|
|
</section>
|
|
|
|
<section class="quick-start-section" id="helpEditor">
|
|
<h3>MSR Editor</h3>
|
|
<p>The editor can be used as a full MSR editor. <b>GUI → MSR</b> replaces the visible MSR with a fresh document built from the current analysis settings, so the GUI is the source of the text.</p>
|
|
<p>Editing the text by hand makes the MSR <i>authoritative</i>: it is now the source of truth, and the lock icon changes to a closed padlock <svg class="editor-help-lock" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="5" y="10" width="14" height="11" rx="2"></rect><path class="editor-lock-closed" d="M8 10V7a4 4 0 0 1 8 0v3"></path></svg> to show that the editor owns the document. While locked, <b>Fit</b> and <b>Plot</b> use this text as-is and GUI changes do not silently replace it. Choose <b>MSR → GUI</b> to copy recognized settings back into the GUI fields; this does not surrender ownership. Click the closed lock icon to unlock and return control to the GUI (an open padlock <svg class="editor-help-lock" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="5" y="10" width="14" height="11" rx="2"></rect><path class="editor-lock-open" d="M8 10V7a4 4 0 0 1 7.6-1.8"></path></svg> means the GUI owns it, and the next GUI generation or fit may replace the document).</p>
|
|
<p>In Electron, use the File menu to open and save MSR files directly.</p>
|
|
</section>
|
|
|
|
<section class="quick-start-section" id="helpResults">
|
|
<h3>Results and diagnostics</h3>
|
|
<p>The Results tab keeps generated files, fit statistics and the full command log. The status bar provides the short state; click its state or message to open the run log immediately. Hover over shortened values to see them in full.</p>
|
|
</section>
|
|
|
|
<section class="quick-start-section" id="helpAbout">
|
|
<h3>About muSRFlow</h3>
|
|
<p class="quick-start-identity"><b>muSRFlow <span id="musrflowVersion">__MUSRFLOW_VERSION__</span></b>
|
|
<span aria-hidden="true">·</span> <span id="musrflowEdition">__MUSRFLOW_EDITION__</span>
|
|
<span aria-hidden="true">·</span> build <span id="musrflowRevision">__MUSRFLOW_REVISION__</span><span id="musrflowModified">__MUSRFLOW_MODIFIED__</span>
|
|
</p>
|
|
<p>Desktop and web workflow for musrfit.</p>
|
|
<dl class="quick-start-build-details">
|
|
<div><dt>Runtime</dt><dd id="musrflowRuntime">__MUSRFLOW_RUNTIME__</dd></div>
|
|
<div><dt>musrfit</dt><dd id="musrfitVersion">__MUSRFIT_VERSION__</dd></div>
|
|
<div><dt>ROOT</dt><dd id="rootVersion">__ROOT_VERSION__</dd></div>
|
|
</dl>
|
|
<p>Author: <a href="mailto:zaher.salman@psi.ch">Zaher Salman</a>. Copyright (C) 2026 Zaher Salman. GNU GPL version 3 or later.</p>
|
|
</section>
|
|
</main>
|
|
|
|
<footer class="quick-start-footer" id="quickStartFooter">
|
|
<span>Questions? Contact <a href="mailto:zaher.salman@psi.ch">Zaher Salman</a>.</span>
|
|
<span>Full user manual: <a href="https://musruser.psi.ch/muSRFlow/docs/" target="_blank" rel="noopener">muSRFlow docs</a>.</span>
|
|
</footer>
|
|
<script>
|
|
(function() {
|
|
function focusSection(sectionId) {
|
|
let body = document.getElementById("quickStartBody");
|
|
if (!body) return;
|
|
for (let section of body.querySelectorAll(".quick-start-section")) {
|
|
section.classList.remove("quick-start-section-active");
|
|
}
|
|
let target = document.getElementById(sectionId || "helpRuns");
|
|
if (!target) target = document.getElementById("helpRuns");
|
|
if (!target) return;
|
|
target.classList.add("quick-start-section-active");
|
|
setTimeout(function() {
|
|
target.scrollIntoView({ block: "start" });
|
|
}, 0);
|
|
}
|
|
|
|
function displayValue(id, value, fallback) {
|
|
let element = document.getElementById(id);
|
|
if (!element) return;
|
|
let current = element.textContent || "";
|
|
if (value) element.textContent = value;
|
|
else if (/^__.+__$/.test(current)) element.textContent = fallback;
|
|
}
|
|
|
|
function setBuildInfo(info) {
|
|
info = info || {};
|
|
displayValue("musrflowVersion", info.version, "development source");
|
|
displayValue("musrflowEdition", info.edition, "Web source");
|
|
displayValue("musrflowRevision", info.revision, "unrecorded");
|
|
displayValue("musrflowRuntime", info.runtimeProvider, "not reported");
|
|
displayValue("musrfitVersion", info.musrfit, "not reported");
|
|
displayValue("rootVersion", info.root, "not reported");
|
|
let modified = document.getElementById("musrflowModified");
|
|
if (modified && typeof info.modified === "boolean") {
|
|
modified.textContent = info.modified ? " (modified)" : "";
|
|
} else if (modified && /^__.+__$/.test(modified.textContent || "")) {
|
|
modified.textContent = "";
|
|
}
|
|
}
|
|
|
|
window.focusQuickStartSection = focusSection;
|
|
setBuildInfo();
|
|
focusSection(window.location.hash ? window.location.hash.slice(1) : "helpRuns");
|
|
window.addEventListener("hashchange", function() {
|
|
focusSection(window.location.hash ? window.location.hash.slice(1) : "helpRuns");
|
|
});
|
|
|
|
function receiveQuickStartPayload(payload) {
|
|
focusSection(payload && payload.sectionId ? payload.sectionId : "helpRuns");
|
|
setBuildInfo(payload && payload.buildInfo);
|
|
}
|
|
|
|
if (window.electronAPI && window.electronAPI.ipc) {
|
|
window.electronAPI.ipc.on("quickStartSection", receiveQuickStartPayload);
|
|
} else if (typeof require === "function") {
|
|
try {
|
|
require("electron").ipcRenderer.on("quickStartSection", function(event, payload) {
|
|
receiveQuickStartPayload(payload);
|
|
});
|
|
} catch (error) {
|
|
console.log("Could not attach Quick Start Electron channel:", error);
|
|
}
|
|
}
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|