Fix About.py bug and fix math for TDR #715
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a bug with About.py which results in the program not being able to run if you call
python nanovna_saver.py
. The bug is caused by the path for setuptools-scm not being correctly defined. The path should be../..
because the .git folder is two directories below, not..
There is also a bug with the math for TDR. In the current state, the TDR is not able to distinguish between open and short. In the new code, the TDR is now able to calculate impedance.
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
For the About.py bug: a LookupError is thrown by setuptools-scm.
For the TDR bug:
I am using a LiteVNA with a frequency span of 50kHz - 8 GHz. The same calibration was used for every test.
Here is the original software measuring an open transmission line:
Here is the original software measuring a short transmission line:
As you can see the graphs are literally the same, even though the impedance should be zero for the short and infinity for the open.
Here are the other two tests done below:
Terminated:
3dB attenuator:
Obviously the terminated plot should be flat and around 50 ohms, but that doesn't seem to be true. The 3dB attenuator should be around 131 ohms (according to my multimeter).
What is the new behavior?
Open Tline:
Shorted Tline:
Terminated Tline:
Tline terminated in 3dB attenuator (measures 131 ohms at DC)
Does this introduce a breaking change?
Other information
The current code plots the magnitude of the impedance. Future updates might allow the user to plot the impedance in mag/ang or real/imag. It might also be a good idea to let the user set the scale for TDR measurements, instead of automatically setting it to 1000