You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+279-3Lines changed: 279 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,11 @@ Working on it:
40
40
*[Getting Data from Active Screen](#getting-data-from-active-screen)
41
41
*[Saving Screen Images](#saving-screen-images)
42
42
*[Plotting Data with Matplotlib](#plotting-data-with-matplotlib)
43
+
*[Example 1: Plot using On-Screen Trace Data and Frequencies](#example-1-plot-using-on-screen-trace-data-and-frequencies)
44
+
*[Example 2: Plot using Scan Data and Frequencies](#example-2-plot-using-scan-data-and-frequencies)
45
+
*[Example 3: Plot using SCAN and SCANRAW Data and Calculated Frequencies](#example-3-plot-using-scan-and-scanraw-data-and-calculated-frequencies)
46
+
*[Example 4: Plot a Waterfall using SCAN and Calculated Frequencies](#example-4-plot-a-waterfall-using-scan-and-calculated-frequencies)
47
+
*[Saving SCAN Data to CSV](#saving-scan-data-to-csv)
43
48
*[Accessing the tinySA Directly](#accessing-the-tinysa-directly)
44
49
*[List of tinySA Commands and their Library Commands](#list-of-tinysa-commands-and-their-library-commands)
45
50
*[List of Commands Removed from Library](#list-of-commands-removed-from-library)
@@ -501,7 +506,7 @@ else: # port open, complete task(s) and disconnect
501
506
502
507
### Plotting Data with Matplotlib
503
508
504
-
**Example 1: Plot using On-Screen Trace Data and Frequencies**
509
+
#### **Example 1: Plot using On-Screen Trace Data and Frequencies**
505
510
This example plots the last/current sweep of data from the tinySA device.
506
511
`data()` gets the trace data. `frequencies()` gets the frequency values used.
507
512
`byteArrayToNumArray(byteArr)` takes in the returned trace data and frequency
@@ -577,7 +582,7 @@ else: # port open, complete task(s) and disconnect
577
582
<palign="center">Plotted On-Screen Trace Data of a Frequency Sweep from 100 kHz to 800 MHz</p>
578
583
579
584
580
-
**Example 2: Plot using Scan Data and Frequencies**
585
+
#### **Example 2: Plot using Scan Data and Frequencies**
581
586
582
587
This example uses `scan()` to take a data measurement of data that DOES NOT need to been on the screen, unlike **Example 1** above. Then, the frequencies on the x-axis are calculated between the `start` and `stop` frequencies using the `number of points`. This is done because `frequencies()` would have the values of the last scan, which are connected to `RBW` and not the `number of points`.
583
588
@@ -667,7 +672,7 @@ else: # if port found and connected, then complete task(s) and disconnect
667
672
<palign="center">Plotted Scan Data of a Frequency Sweep from 1 GHz to 3 GHz</p>
668
673
669
674
670
-
**Example 3: Plot using SCAN and SCANRAW Data and Calculated Frequencies**
675
+
#### **Example 3: Plot using SCAN and SCANRAW Data and Calculated Frequencies**
671
676
672
677
This example uses `scan()` and `scanraw()` to take a data measurement of data that DOES NOT need to been on the screen, unlike **Example 1** above. Then, the frequencies on the x-axis are calculated between the `start` and `stop` frequencies using the `number of points`. This is done because `frequencies()` would have the values of the last scan, which are connected to `RBW` and not the `number of points`.
673
678
@@ -824,6 +829,277 @@ else: # if port found and connected, then complete task(s) and disconnect
824
829
825
830
826
831
832
+
#### **Example 4: Plot a Waterfall using SCAN and Calculated Frequencies**
833
+
834
+
```python
835
+
# import tinySA library
836
+
# (NOTE: check library path relative to script path)
In some cases, this library may not cover all possible command versions, or new features might not be included yet. The tinySA can be accessed directly using the `command()` function. There is NO ERROR CHECKING on this function. It takes the full argument, just as if arguments were entered on the command line.
0 commit comments