ui: a measurement's noise band and HF reject are settable and persisted
Two rows in the measure dialog, built the way the threshold and side rows are and appended
beside them: the band as a percentage of the window's own peak-to-peak (the unit the engine
takes), the corner in Hz with 0 off. They are seeded when editing, shown only where they do
something -- the band for the crossing types, since it moves the edge decision and nothing
else, the reject for all of them, since it sits before both walks -- and read into
`MeasureOptions` on apply.
They persist as two *named* keys, `noise` and `hf`, on the same `o <<` chain as the keys
beside them and read back through the same keyed reader, so a session written before this
change loads with 10.0 and 0.0: today's behaviour exactly, with no version check.
[configs] now proves the round trip rather than assuming it. The probe sets the first
measurement's band and corner to 7.5 and 250 before saving, so a key that never reached the
file reads back as the defaults:
[configs] round trip read=1 comment='written by the configs probe' ... measures=4 math=0 noise=7.5 hf=250
The rest of that line is unchanged, and the run is free of Gtk-CRITICAL.
This commit is contained in:
1 parent
380ddb9a77
commit
84aebf4116
6 files changed
+63
-7
No files matched your search
+12
-1
@@ -556,6 +556,16 @@ bool load_layout(const std::string& path, LayoutState& out) {
|
||||
m.options.threshold_pct = std::stod(value);
|
||||
} catch (...) {
|
||||
}
|
||||
} else if (key == "noise") {
|
||||
try {
|
||||
m.options.noise_pct = std::stod(value);
|
||||
} catch (...) {
|
||||
}
|
||||
} else if (key == "hf") {
|
||||
try {
|
||||
m.options.hf_fc = std::stod(value);
|
||||
} catch (...) {
|
||||
}
|
||||
} else if (key == "above") {
|
||||
m.options.above = value == "true";
|
||||
} else if (key == "show") {
|
||||
@@ -668,7 +678,8 @@ bool save_layout(const std::string& path, const LayoutState& state) {
|
||||
o << "\n[[measure]]\nsignal = " << toml_escape(m.signal) << "\ntype = " << kind
|
||||
<< "\nthreshold = " << m.options.threshold_pct
|
||||
<< "\nabove = " << (m.options.above ? "true" : "false") << "\nshow = "
|
||||
<< (m.options.show_on_plot ? "true" : "false") << "\n";
|
||||
<< (m.options.show_on_plot ? "true" : "false") << "\nnoise = " << m.options.noise_pct
|
||||
<< "\nhf = " << m.options.hf_fc << "\n";
|
||||
}
|
||||
|
||||
// A sibling temp file + rename: a crash mid-write leaves the old layout, not a
|
||||
|
||||
Reference in new issue
Block a user