From 04054f22c5917ab3ca9127ede0285bc9251abf9b Mon Sep 17 00:00:00 2001 From: Michael Hohenstein Date: Wed, 7 Feb 2024 11:39:50 +0100 Subject: [PATCH] [hard] resistor calculation: small improvement --- hardware/calc_resistors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hardware/calc_resistors.py b/hardware/calc_resistors.py index 7bc2c01..96b1431 100755 --- a/hardware/calc_resistors.py +++ b/hardware/calc_resistors.py @@ -30,6 +30,7 @@ # calculate the resistor and capacitor ratio for the attenuator Attenuator_Resistor_ratio = (2 * max(In_Ranges)) / U_max - 1 # R_1 / R_2 +print(f"Resistor Ratio for the Attenuator: R_1 / R_2 = {Attenuator_Resistor_ratio}") # the amplifier has to map a smaller voltage range to the range of the maximum input voltage since the attenuator stays the same for each input range amp_gains = [max(In_Ranges) / i for i in In_Ranges] @@ -67,6 +68,6 @@ def print_results_table(lists: list[list], titles: list[str]) -> None: "Amplifier Gain", "Offset Voltage", "Corrected offset Voltage", - "R_a / R_b for corr. Offset Voltage" + "R_a / R_b corr. Offset" ] )