diff --git a/corrscope/gui/__init__.py b/corrscope/gui/__init__.py index af97d7e..8cbfc82 100644 --- a/corrscope/gui/__init__.py +++ b/corrscope/gui/__init__.py @@ -1115,7 +1115,7 @@ class ChannelModel(qc.QAbstractTableModel): Column("trigger_width", int, 1, "Trigger Width ×", always_show=True), Column("render_width", int, 1, "Render Width ×", always_show=True), Column("trigger__mean_responsiveness", float, None, "DC Removal\nRate"), - Column("trigger__sign_strength", float, None), + Column("trigger__sign_strength", float, None, "Sign\nAmplification"), Column("trigger__edge_direction", plus_minus_one, None), Column("trigger__edge_strength", float, None), Column("trigger__slope_width", float, None), diff --git a/corrscope/gui/view_mainwindow.py b/corrscope/gui/view_mainwindow.py index a1deb19..eef5db4 100644 --- a/corrscope/gui/view_mainwindow.py +++ b/corrscope/gui/view_mainwindow.py @@ -308,7 +308,7 @@ class MainWindow(QWidget): with add_row( s, - tr("Sign Triggering\n(for triangle waves)"), + tr("Sign Amplification\n(for triangle waves)"), BoundDoubleSpinBox, name="trigger__sign_strength", minimum=0, diff --git a/corrscope/triggers.py b/corrscope/triggers.py index cd696a3..0df7740 100644 --- a/corrscope/triggers.py +++ b/corrscope/triggers.py @@ -286,7 +286,7 @@ class CorrelationTriggerConfig( # Whether to subtract the mean from each frame mean_responsiveness: float = 1.0 - # Sign enhancement + # Sign amplification sign_strength: float = 0 # Maximum distance to move, in terms of trigger_ms/trigger_samp (not in GUI) diff --git a/docs/index.md b/docs/index.md index c1abe75..1b2c940 100644 --- a/docs/index.md +++ b/docs/index.md @@ -71,7 +71,7 @@ NES triangle waves are stair-stepped. If "DC Removal Rate" is nonzero, on every - Use any "Trigger Direction" you prefer. Rising and Falling both work equally well. - Set "DC Removal Rate" to 0. This causes corrscope to look at the actual zero crossings instead of subtracting an estimated DC offset on each frame. -- Alternatively, set "Sign Triggering" to 1 or so. This causes corrscope to preprocess the waveform before DC is removed, and add 0.5(peak-to-peak amplitude) to positive samples and subtract 0.5(peak-to-peak amplitude) from negative samples. The resulting steep edges will remain as zero crossings, even after DC is filtered out. +- Alternatively, set "Sign Amplification" to 1 or so. This causes corrscope to preprocess the waveform before DC is removed, and add 0.5(peak-to-peak amplitude) to positive samples and subtract 0.5(peak-to-peak amplitude) from negative samples. The resulting steep edges will remain as zero crossings, even after DC is filtered out. - Both techniques can be combined if you want. @@ -141,11 +141,11 @@ On each frame, corrscope fetches (from the channel) a buffer of mono `data` with - If `Edge Direction` is "Falling (-1)", then both the main and post trigger will receive negated data from the wave, causing both to search for falling edges (instead of rising edges). -### Sign Enhancement +### Sign Amplification Some waves do not have clear edges. For example, triangle waves do not have clear rising edges (leading to suboptimal triggering), and NES triangles have 15 small rising edges, causing corrscope to jump between them. -If `Sign Strength` (Sign Triggering on the GUI) is set to nonzero `strength`, corrscope computes `peak = max(abs(data))`. It adds `peak * strength` to positive parts of `data`, subtracts `peak * strength` from negative parts of `data`, and heavily amplifies parts of the wave near zero. This helps the correlation trigger locate zero-crossings exactly, and is necessary if you enable DC removal (which offsets the wave by a variable distance vertically). +If `Sign Amplification` is set to nonzero `strength`, corrscope computes `peak = max(abs(data))`. It adds `peak * strength` to positive parts of `data`, subtracts `peak * strength` from negative parts of `data`, and heavily amplifies parts of the wave near zero. This helps the correlation trigger locate zero-crossings exactly, and is necessary if you enable DC removal (which offsets the wave by a variable distance vertically). ### Mean and Period