| 1 |
.. _sig-menu-create: |
| 2 |
|
| 3 |
Create Signals |
| 4 |
============== |
| 5 |
|
| 6 |
This section describes how to create new signals from various mathematical models. |
| 7 |
|
| 8 |
.. figure:: /images/shots/s_create.png |
| 9 |
|
| 10 |
Screenshot of the "Create" menu. |
| 11 |
|
| 12 |
When the "Signal Panel" is selected, the menus and toolbars are updated to |
| 13 |
provide signal-related actions. |
| 14 |
|
| 15 |
The "Create" menu allows you to create new signals from various models (see below). |
| 16 |
|
| 17 |
New signal |
| 18 |
^^^^^^^^^^ |
| 19 |
|
| 20 |
Create a new signal from various models: |
| 21 |
|
| 22 |
.. list-table:: |
| 23 |
:header-rows: 1 |
| 24 |
:widths: 10, 20, 70 |
| 25 |
:class: longtable |
| 26 |
|
| 27 |
* - Icon |
| 28 |
- Model |
| 29 |
- Equation |
| 30 |
* - .. image:: ../../../datalab/data/icons/create/1d-zero.svg |
| 31 |
:width: 30px |
| 32 |
- Zero |
| 33 |
- :math:`y[i] = 0` |
| 34 |
* - .. image:: ../../../datalab/data/icons/create/1d-normal.svg |
| 35 |
:width: 30px |
| 36 |
- Normal distribution |
| 37 |
- :math:`y[i]` is normally distributed with configurable mean and standard deviation |
| 38 |
* - .. image:: ../../../datalab/data/icons/create/1d-poisson.svg |
| 39 |
:width: 30px |
| 40 |
- Poisson distribution |
| 41 |
- :math:`y[i]` is Poisson distributed with configurable mean |
| 42 |
* - .. image:: ../../../datalab/data/icons/create/1d-uniform.svg |
| 43 |
:width: 30px |
| 44 |
- Uniform distribution |
| 45 |
- :math:`y[i]` is uniformly distributed between two configurable bounds |
| 46 |
* - .. image:: ../../../datalab/data/icons/create/gaussian.svg |
| 47 |
:width: 30px |
| 48 |
- Gaussian |
| 49 |
- :math:`y = y_{0}+\dfrac{A}{\sqrt{2\pi} \cdot \sigma} \cdot \exp\left(-\dfrac{1}{2} \cdot \left(\dfrac{x-x_{0}}{\sigma}\right)^2\right)` |
| 50 |
* - .. image:: ../../../datalab/data/icons/create/lorentzian.svg |
| 51 |
:width: 30px |
| 52 |
- Lorentzian |
| 53 |
- :math:`y = y_{0}+\dfrac{A}{\sigma \cdot \pi} \cdot \dfrac{1}{1+\left(\dfrac{x-x_{0}}{\sigma}\right)^2}` |
| 54 |
* - .. image:: ../../../datalab/data/icons/create/voigt.svg |
| 55 |
:width: 30px |
| 56 |
- Voigt |
| 57 |
- :math:`y = y_{0}+A \cdot \dfrac{\Re\left(\exp\left(-z^2\right) \cdot \erfc(-j \cdot z)\right)}{\sqrt{2\pi} \cdot \sigma}` with :math:`z = \dfrac{x-x_{0}-j \cdot \sigma}{\sqrt{2} \cdot \sigma}` |
| 58 |
* - .. image:: ../../../datalab/data/icons/create/planck.svg |
| 59 |
:width: 30px |
| 60 |
- Blackbody (Planck's law) |
| 61 |
- :math:`y = \dfrac{2 h c^2}{\lambda^5 \left(\exp\left(\dfrac{h c}{\lambda k T}\right)-1\right)}` |
| 62 |
* - .. image:: ../../../datalab/data/icons/create/sine.svg |
| 63 |
:width: 30px |
| 64 |
- Sine |
| 65 |
- :math:`y = y_{0}+A\sin\left(2\pi \cdot f \cdot x+\phi\right)` |
| 66 |
* - .. image:: ../../../datalab/data/icons/create/cosine.svg |
| 67 |
:width: 30px |
| 68 |
- Cosine |
| 69 |
- :math:`y = y_{0}+A\cos\left(2\pi \cdot f \cdot x+\phi\right)` |
| 70 |
* - .. image:: ../../../datalab/data/icons/create/sawtooth.svg |
| 71 |
:width: 30px |
| 72 |
- Sawtooth |
| 73 |
- :math:`y = y_{0}+A \left( 2 \left( f x + \frac{\phi}{2\pi} - \left\lfloor f x + \frac{\phi}{2\pi} + \frac{1}{2} \right\rfloor \right) \right)` |
| 74 |
* - .. image:: ../../../datalab/data/icons/create/triangle.svg |
| 75 |
:width: 30px |
| 76 |
- Triangle |
| 77 |
- :math:`y = y_{0}+A \sawtooth\left(2 \pi f x + \phi, \text{width} = 0.5\right)` |
| 78 |
* - .. image:: ../../../datalab/data/icons/create/square.svg |
| 79 |
:width: 30px |
| 80 |
- Square |
| 81 |
- :math:`y = y_0 + A \sgn\left( \sin\left( 2\pi f x + \phi \right) \right)` |
| 82 |
* - .. image:: ../../../datalab/data/icons/create/sinc.svg |
| 83 |
:width: 30px |
| 84 |
- Cardinal sine |
| 85 |
- :math:`y = y_0 + A \sinc\left(2\pi f x + \phi\right)` |
| 86 |
* - .. image:: ../../../datalab/data/icons/create/linear_chirp.svg |
| 87 |
:width: 30px |
| 88 |
- Linear chirp |
| 89 |
- :math:`y = y_{0} + A \sin\left(\phi_{0} + 2\pi \left(f_{0}\, x + \frac{1}{2} c\, x^{2}\right)\right)` |
| 90 |
* - .. image:: ../../../datalab/data/icons/create/step.svg |
| 91 |
:width: 30px |
| 92 |
- Step |
| 93 |
- :math:`y = y_{0}+A \left\{\begin{array}{ll}1 & \text{if } x > x_{0} \\ 0 & \text{otherwise}\end{array}\right.` |
| 94 |
* - .. image:: ../../../datalab/data/icons/create/exponential.svg |
| 95 |
:width: 30px |
| 96 |
- Exponential |
| 97 |
- :math:`y = y_{0}+A \exp\left(B \cdot x\right)` |
| 98 |
* - .. image:: ../../../datalab/data/icons/create/logistic.svg |
| 99 |
:width: 30px |
| 100 |
- Logistic |
| 101 |
- :math:`y = y_{0} + \dfrac{A}{1 + \exp\left(-k \left(x - x_{0}\right)\right)}` |
| 102 |
* - .. image:: ../../../datalab/data/icons/create/pulse.svg |
| 103 |
:width: 30px |
| 104 |
- Pulse |
| 105 |
- :math:`y = y_{0}+A \left\{\begin{array}{ll}1 & \text{if } x_{0} < x < x_{1} \\ 0 & \text{otherwise}\end{array}\right.` |
| 106 |
* - .. image:: ../../../datalab/data/icons/create/step_pulse.svg |
| 107 |
:width: 30px |
| 108 |
- Step Pulse |
| 109 |
- | :math:`y = \left( \begin{cases} y_0 & \text{if } x < t_0 \\ y_0 + A \cdot \dfrac{x - t_0}{t_r} & \text{if } t_0 \leq x < t_0 + t_r \\ y_0 + A & \text{if } x \geq t_0 + t_r \end{cases} \right) + \mathcal{N}\left(0, \sigma_n\right)` |
| 110 |
|
| 111 |
| where: |
| 112 |
|
| 113 |
* :math:`t_0` is the pulse start time, |
| 114 |
* :math:`t_r` is the rise time, |
| 115 |
* :math:`\sigma_n` is the noise amplitude |
| 116 |
|
| 117 |
* - .. image:: ../../../datalab/data/icons/create/square_pulse.svg |
| 118 |
:width: 30px |
| 119 |
- Square Pulse |
| 120 |
- | :math:`y(x) = \left(\begin{cases} y_0 & \text{if } x < t_0 \\ y_0 + A \cdot \dfrac{x - t_0}{t_r} & \text{if } t_0 \leq x < t_0 + t_r \\ y_0 + A & \text{if } t_0 + t_r \leq x < t_1 \\ y_0 + A - A \cdot \dfrac{x - t_1}{t_f} & \text{if } t_1 \leq x < t_1 + t_f \\ y_0 & \text{if } x \geq t_1 + t_f \end{cases} \right) + \mathcal{N}(0, \sigma_n)` |
| 121 |
|
| 122 |
| where: |
| 123 |
|
| 124 |
* :math:`t_0` is the pulse start time, |
| 125 |
* :math:`t_r` is the rise time, |
| 126 |
* :math:`t_f` is the fall time, |
| 127 |
* :math:`t_1 = t_0 + t_r + d` is the time at which the decay starts, |
| 128 |
* :math:`\sigma_n` is the noise amplitude |
| 129 |
* the duration of the plateau :math:`d` is computed as :math:`d = t_{\mathrm{FWHM}} - \dfrac{t_r + t_f}{2}` from the full width at half maximum :math:`t_{\mathrm{FWHM}}` |
| 130 |
|
| 131 |
.. warning:: |
| 132 |
|
| 133 |
The duration of the plateau :math:`d` should not be negative. |
| 134 |
|
| 135 |
* - .. image:: ../../../datalab/data/icons/create/polynomial.svg |
| 136 |
:width: 30px |
| 137 |
- Polynomial |
| 138 |
- :math:`y = y_{0}+A_{0}+A_{1} \cdot x+A_{2} \cdot x^2+\ldots+A_{n} \cdot x^n` |
| 139 |
* - |
| 140 |
- Custom |
| 141 |
- Manual input of X and Y values |