Skip to content

Commit

Permalink
Changed references from master to main in doc page
Browse files Browse the repository at this point in the history
Signed-off-by: spagadar <srikanth.pagadarai@analog.com>
  • Loading branch information
SrikanthPagadarai committed Oct 23, 2024
1 parent 321eb2c commit 477a737
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doc/spectral_analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ We first generate (or import) a waveform to be analyzed, compute its FFT, and fi
style A fill:#9fa4fc
```
Genalyzer supports [sine](#genalyzer.sin), [cosine](#genalyzer.cos), [ramp](#genalyzer.ramp), and [Gaussian](#genalyzer.gaussian) random waveforms. It also contains a [waveform analysis](#genalyzer.wf_analysis) utility to summarize a waveform, generated or otherwise. Please see [this](https://github.com/analogdevicesinc/genalyzer/blob/master/bindings/python/examples/gn_doc_tone_gen.py) Python script for more details. A time-domain plot of the complex-sinusoidal tone for which we compute FFT in the next step is shown below for reference.
Genalyzer supports [sine](#genalyzer.sin), [cosine](#genalyzer.cos), [ramp](#genalyzer.ramp), and [Gaussian](#genalyzer.gaussian) random waveforms. It also contains a [waveform analysis](#genalyzer.wf_analysis) utility to summarize a waveform, generated or otherwise. Please see [this](https://github.com/analogdevicesinc/genalyzer/blob/main/bindings/python/examples/gn_doc_tone_gen.py) Python script for more details. A time-domain plot of the complex-sinusoidal tone for which we compute FFT in the next step is shown below for reference.

```{figure} https://github.com/analogdevicesinc/genalyzer/blob/master/doc/figures/complex_sinusoidal_waveform.png
```{figure} https://github.com/analogdevicesinc/genalyzer/blob/main/doc/figures/complex_sinusoidal_waveform.png
Time-domain plot of a ``300 KHz`` complex sinusoidal tone sampled at ``3 MSPS``.
```
Expand Down Expand Up @@ -75,8 +75,8 @@ Genalyzer doesn't support an overlap window between different snapshots that are
Genalyzer's ``fft()`` computes FFT for complex-valued data only. To compute FFT for real-valued data, use ``rfft()``. Additional details [here](#genalyzer.rfft).
```

The FFT plot of the complex-sinusoidal tone in our working example is shown below for reference. Please see [this](https://github.com/analogdevicesinc/genalyzer/blob/master/bindings/python/examples/gn_doc_fft.py) Python script for more details.
```{figure} https://github.com/analogdevicesinc/genalyzer/blob/master/doc/figures/fft.png
The FFT plot of the complex-sinusoidal tone in our working example is shown below for reference. Please see [this](https://github.com/analogdevicesinc/genalyzer/blob/main/bindings/python/examples/gn_doc_fft.py) Python script for more details.
```{figure} https://github.com/analogdevicesinc/genalyzer/blob/main/doc/figures/fft.png
FFT plot of a ``300 KHz`` complex sinusoidal tone sampled at ``3 MSPS``.
```
Expand All @@ -95,7 +95,7 @@ FFT plot of a ``300 KHz`` complex sinusoidal tone sampled at ``3 MSPS``.
style SA fill:#9fa4fc
```
Conducting spectral analysis using Genalyzer involves two steps: configuration and analysis. Please refer to [this](https://github.com/analogdevicesinc/genalyzer/blob/master/bindings/python/examples/gn_doc_spectral_analysis1.py) Python script to follow the discussion in this subsection.
Conducting spectral analysis using Genalyzer involves two steps: configuration and analysis. Please refer to [this](https://github.com/analogdevicesinc/genalyzer/blob/main/bindings/python/examples/gn_doc_spectral_analysis1.py) Python script to follow the discussion in this subsection.

### Configure Genalyzer
```{eval-rst}
Expand Down Expand Up @@ -155,7 +155,7 @@ The number of single-side bins (SSBs) for a _component_ is an important configur
style SA fill:#ffffff
```

In [this](https://github.com/analogdevicesinc/genalyzer/blob/master/bindings/python/examples/gn_doc_spectral_analysis1.py) Python script, FFT analysis is run by the following line:
In [this](https://github.com/analogdevicesinc/genalyzer/blob/main/bindings/python/examples/gn_doc_spectral_analysis1.py) Python script, FFT analysis is run by the following line:
```{code-block} python
results = gn.fft_analysis(test_label, fft_cplx, nfft, axis_type)
```
Expand Down Expand Up @@ -191,7 +191,7 @@ The first table we look at is the ``labels`` table.
+------------------+--------------------+-------------------+
```

Notice that this table shows ``7`` frequencies, their magnitudes, and their labels. In addition to the auto-configured ``dc`` component, with the help of the manually configured signal component, Genalyzer has identified ``4`` others: the image, two second-order harmonics, and one third-order harmonic. We also see a ``wo`` (worst-other) component which, as the name indicates, is the component of the highest magnitude excluding the ones listed so far. By default, Genalyzer identifies harmonics upto the `6`th order. In [this](https://github.com/analogdevicesinc/genalyzer/blob/master/bindings/python/examples/gn_doc_spectral_analysis1.py) Python script, we set the the number of harmonics to take into account to ``3`` with the following line:
Notice that this table shows ``7`` frequencies, their magnitudes, and their labels. In addition to the auto-configured ``dc`` component, with the help of the manually configured signal component, Genalyzer has identified ``4`` others: the image, two second-order harmonics, and one third-order harmonic. We also see a ``wo`` (worst-other) component which, as the name indicates, is the component of the highest magnitude excluding the ones listed so far. By default, Genalyzer identifies harmonics upto the `6`th order. In [this](https://github.com/analogdevicesinc/genalyzer/blob/main/bindings/python/examples/gn_doc_spectral_analysis1.py) Python script, we set the the number of harmonics to take into account to ``3`` with the following line:
```{code-block} python
gn.fa_hd(test_label, num_harmonics)
```
Expand Down Expand Up @@ -225,7 +225,7 @@ Next, we look at the ``tone_boxes`` table.
+--------------------------+--------------+
```

From this table, we see that each of the ``7`` components spans a width of ``100 Hz``. This value equals sample-rate divided by the FFT order we chose in the working example. Because the tone is coherently sampled and we chose the sample-rate to be an integer multiple of the FFT-order, all the power corresponding to a component is located in exactly one bin. This is the reason why, in [this](https://github.com/analogdevicesinc/genalyzer/blob/master/bindings/python/examples/gn_doc_spectral_analysis1.py) example, we set the number of single-side bins (SSBs) for every component to ``0``. So, Genalyzer takes into account the magnitude value corresponding to exactly one bin (and ``0`` bins on either side) as that component's contribution in various metrics computed. In a subsequent example, we consider the case when it becomes necessary to set the number of SSBs to a value greater than ``0``.
From this table, we see that each of the ``7`` components spans a width of ``100 Hz``. This value equals sample-rate divided by the FFT order we chose in the working example. Because the tone is coherently sampled and we chose the sample-rate to be an integer multiple of the FFT-order, all the power corresponding to a component is located in exactly one bin. This is the reason why, in [this](https://github.com/analogdevicesinc/genalyzer/blob/main/bindings/python/examples/gn_doc_spectral_analysis1.py) example, we set the number of single-side bins (SSBs) for every component to ``0``. So, Genalyzer takes into account the magnitude value corresponding to exactly one bin (and ``0`` bins on either side) as that component's contribution in various metrics computed. In a subsequent example, we consider the case when it becomes necessary to set the number of SSBs to a value greater than ``0``.
```{caution}
The choice of the number of single-side bins (SSBs) is important when the signal is not coherently sampled and when the sample-rate is not an integer multiple of the FFT-order.
```
Expand Down Expand Up @@ -471,7 +471,7 @@ Please refer to the documentation page for [``fft_analysis()``](#genalyzer.fft_a

In summary, the magnitude spectrum plot for the working example considered so far, with DC, signal, and harmonic components labeled, is shown below.

```{figure} https://github.com/analogdevicesinc/genalyzer/blob/master/doc/figures/spectral_analysis_summary.png
```{figure} https://github.com/analogdevicesinc/genalyzer/blob/main/doc/figures/spectral_analysis_summary.png
Magnitude spectrum of the FFT showing signal, harmonic, DC, and WO components.
```

0 comments on commit 477a737

Please sign in to comment.