From 4fad2f21d8d83171696ca99367ae3b608c3e40b4 Mon Sep 17 00:00:00 2001 From: Harley Peterson Date: Tue, 28 Jul 2026 14:39:20 -0500 Subject: [PATCH 1/3] Add ramp section --- .../user-guide/injection/index.rst | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/source/getting-started/user-guide/injection/index.rst b/source/getting-started/user-guide/injection/index.rst index b445dbd8..2cd6a0c8 100644 --- a/source/getting-started/user-guide/injection/index.rst +++ b/source/getting-started/user-guide/injection/index.rst @@ -583,7 +583,68 @@ The duty cycle is 50%. The :code:`period` parameter is in seconds. +~~~~~~~~~~~~~~~~~~~~~~ +Ramp Injection +~~~~~~~~~~~~~~~~~~~~~~ + +Example :code:`ramp` injection where the :code:`valueMin = 0.3`, :code:`valueMax = 0.8`, and :code:`period = 0.5`: + +.. plot:: + :context: close-figs + :class: align-plot-left + + import matplotlib.pyplot as plt + import numpy as np + + t_step = 1e-3 + tt = np.arange(0, 1, t_step) + yy = np.zeros_like(tt) + + period = 0.5 + minValue = 0.3 + maxValue = 0.8 + + my_slope = (maxValue-minValue) / (period) + + t_local = 0 + for idx,t in enumerate(tt): + yy[idx] = my_slope * (t_local % period) + minValue + + t_local += t_step + if (t_local > period): + t_local = 0 + + fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(5,3)) + ax.plot(tt, yy) + ax.set_ylim(0, 1) + + ax.set_xlabel("Time (sec)") + ax.set_ylabel("Injected Signal") + + anno_lw = 2 + + # Add annotations + ax.plot([0, 1], [maxValue, maxValue], color='black', linewidth=anno_lw, linestyle='dashed') + ax.text(0, minValue + 0.06, "valueMin", bbox=dict(facecolor='white', alpha=0.8)) + ax.plot([0, 1], [minValue, minValue], color='black', linewidth=anno_lw, linestyle='dashed') + ax.text(0, maxValue + 0.06, "valueMax", bbox=dict(facecolor='white', alpha=0.8)) + + # Add period label + ax.plot([0, period], [0.1, 0.1], color='black', linewidth=anno_lw) + ax.plot([0, 0], [0.1-0.02, 0.1+0.02], color='black', linewidth=anno_lw) + ax.plot([period, period], [0.1-0.02, 0.1+0.02], color='black', linewidth=anno_lw) + ax.text(period/2, 0.1 + 0.06, "period", ha="center", bbox=dict(facecolor='white', alpha=0.8)) + + fig.tight_layout() + + fig.show() + +**Syntax:** :code:`inj ramp ` + +Injects a sawtooth wave ranging from the min value to the max value, over the period. + +The :code:`period` parameter is in seconds. .. raw:: html From 410dadd965848130bb260a24a4421fb8fbb700b1 Mon Sep 17 00:00:00 2001 From: Harley Peterson Date: Tue, 28 Jul 2026 14:45:36 -0500 Subject: [PATCH 2/3] Add start point --- source/getting-started/user-guide/injection/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/getting-started/user-guide/injection/index.rst b/source/getting-started/user-guide/injection/index.rst index 2cd6a0c8..1f6f0f78 100644 --- a/source/getting-started/user-guide/injection/index.rst +++ b/source/getting-started/user-guide/injection/index.rst @@ -643,6 +643,7 @@ Example :code:`ramp` injection where the :code:`valueMin = 0.3`, :code:`valueMax **Syntax:** :code:`inj ramp ` Injects a sawtooth wave ranging from the min value to the max value, over the period. +The waveform starts at the min value. The :code:`period` parameter is in seconds. From 037d1992b4423094867b1439c4af9bc0d79f3898 Mon Sep 17 00:00:00 2001 From: Harley Peterson <73045075+AwesomeTornado@users.noreply.github.com> Date: Thu, 30 Jul 2026 11:33:20 -0500 Subject: [PATCH 3/3] Add command to header --- source/getting-started/user-guide/injection/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/getting-started/user-guide/injection/index.rst b/source/getting-started/user-guide/injection/index.rst index 1f6f0f78..c6e8d9c1 100644 --- a/source/getting-started/user-guide/injection/index.rst +++ b/source/getting-started/user-guide/injection/index.rst @@ -242,6 +242,7 @@ Per the :code:`help` output, the :code:`inj` sub-commands are: - :code:`chirp ` - Inject chirp - :code:`triangle ` - Inject triangle - :code:`square ` - Inject square +- :code:`ramp ` - Inject ramp Start by typing :code:`inj list` to see all registered injection points.