gainlineup
Gain Lineups for RF Engineering
Example
Here is an example program to use (copy/paste) in main.rs of a new cargo new example-lineup project.
use cascade_vector_return_vector;
use Block;
use Input;
use SignalNode;
The output is similar to the following:
----------------------------
Run function executed
Node 0: Cable Run from Signal Generator to DUT Output
Input Level 4.00 dBm
Node 1: Line Amp at X GHz Output
Input Power 4.00 dBm
Block Gain: 22.00 dB (Cumulative Gain: 16.00 dB)
Noise Figure: 6.02 dB
Output Power 26.00 dBm
Node 2: Cable Run from DUT to Spectrum Analyzer Output
Input Power 26.00 dBm
Block Gain: -6.00 dB (Cumulative Gain: 10.00 dB)
Noise Figure: 6.10 dB
Output Power 20.00 dBm
Final Cascade Summary:
----------------------
Number of Blocks: 2
Pin: 4.00 dBm
Pout: 20.00 dBm
Gain: 10.00 dB
Noise Figure: 6.10 dB
----------------------------
The command line interface is more interactive, and allows for the user to use toml files to define the Input, the Blocks, and run the cascade, turning the output into a html file.
This will generate a html file in the same directory as the toml file.
Node 0: Low Noise Amplifier Output Input Level -50.00 dBm
Node 1: Mixer Output Input Power -60.00 dBm Block Gain: 20.00 dB Block NF: 3.00 dB Cumulative Gain: 30.00 dB Cumulative Noise Figure: 3.06 dB Output Power -40.00 dBm
Node 2: IF Amplifier Output Input Power -35.00 dBm Block Gain: 10.00 dB Block NF: 6.00 dB Cumulative Gain: 45.00 dB Cumulative Noise Figure: 3.06 dB Output Power -25.00 dBm
Final Cascade Summary:
Number of Blocks: 2 Pin: -50.00 dBm Pout: -25.00 dBm Gain: 45.00 dB
'C:\Users\iancleary\Development\gainlineup\files\simple_wideband_config.toml' is a Windows Absolute path. Generating HTML table at: C:\Users\iancleary\Development\gainlineup\files\simple_wideband_config.toml.html file_path in get_file_url function: C:\Users\iancleary\Development\gainlineup\files\simple_wideband_config.toml.html You can open the plot in your browser at: file:///C:/Users/icleary/Development/gainlineup/files/simple_wideband_config.toml.html Attempting to open plot in your default browser... Success! Opening: file:///C:/Users/icleary/Development/gainlineup/files/simple_wideband_config.toml.html
You can view an example of the html output at `files/simple_wideband_config.toml.html`
[](https://github.com/iancleary/gainlineup/tree/main/files/simple_wideband_config.toml.html)
You can view the HTML source file itself here directly: [files/simple_wideband_config.toml.html](https://github.com/iancleary/gainlineup/tree/main/files/simple_wideband_config.toml.html).