setWide(!wide)} moment={moment} />
{data && }
+ focus={focus} setFocus={setFocus} cut={cut} setCut={setCut} set={set} setSet={setSet}
+ sensitivity={sensitivity} setSensitivity={setSensitivity} />}
@@ -118,7 +121,7 @@ function TargetFilter({ d, hidden, setHidden }) {
// The families apply at once (filter of the page, Detectors and LLM); the targets, with the button: each set of targets
// runs the detectors again (the LLM labels do not state their sensors: they do not filter them)
-function Settings({ d, families, setFamilies, targets, setTargets, detect, focus, setFocus, cut, setCut, set, setSet }) {
+function Settings({ d, families, setFamilies, targets, setTargets, detect, focus, setFocus, cut, setCut, set, setSet, sensitivity, setSensitivity }) {
const sensors = Object.keys(d.T).filter(k => k && !k.startsWith("system:"));
const refs = new Set(d.plots.flatMap(p => p.traces).filter(t => t.name.endsWith(" (ref.)")).map(t => t.t));
const [checked, setChecked] = useState(targets ? targets.split(",") : sensors);
@@ -132,6 +135,13 @@ function Settings({ d, families, setFamilies, targets, setTargets, detect, focus
+ {set === "manual" &&
+ Sensitivity: {sensitivity}
+ 1 tolerant, 10 severe: the limits of the manual detectors halved every 2 steps (5: as written)
+ {/* key: the slider starts again from the value kept when the set is chosen again; onChangeEnd: the detectors run on release */}
+ ({ value: v, label: String(v) }))} />
+
}
setFocus(e.currentTarget.checked)} />
new RegExp(`(^|[^\\w])${s.replace(/[^\w]/g, "\\$&"
const sensorsOf = (l, names) => l.sensors ?? names.filter(s => mentions(l.description, s));
// analysis, support: the folder of the analysis, of the support request shown, held by App (the sidebar opens one)
-function Curves({ selection: { station, start, end }, d, setImage, source, setSource, families, targets, focus, hidden, cut, set, analysis, setAnalysis,
+function Curves({ selection: { station, start, end }, d, setImage, source, setSource, families, targets, focus, hidden, cut, set, sensitivity, analysis, setAnalysis,
support, setSupport }) {
const { A, B, T, plots: PLOTS } = d;
const plotIndex = (title, otherwise) => { const i = PLOTS.findIndex(p => p.title === title); return i < 0 ? otherwise : i; };
@@ -361,14 +371,14 @@ function Curves({ selection: { station, start, end }, d, setImage, source, setSo
useEffect(() => {
let alive = true;
setReading(true);
- const url = source === "detectors" ? `/api/detectors?${new URLSearchParams({ station, start, end, targets, set })}`
+ const url = source === "detectors" ? `/api/detectors?${new URLSearchParams({ station, start, end, targets, set, ...(set === "manual" && { sensitivity }) })}`
: `/api/labels?${new URLSearchParams({ station, folder })}`;
call(url).then(l => {
if (!alive) return; // another source was chosen in the meantime
setReading(false); setAllLabels(l || []);
});
return () => { alive = false; };
- }, [source, targets, set, rev]);
+ }, [source, targets, set, sensitivity, rev]);
// One more plot: the first one the page does not show yet, vertical displacement first
function addPlot() {