Python

These posts related to the Python programming language as used for RF and wireless experiments, as well as utilities on this site.

dBm to Milliwatts Conversion Tutorial with Python

I was recently updating one of the online workbooks for the RF Technology Certification program and decided to try and re-write one of the calculators using Python. The topic is teaching how to convert from dBm values to milliwatts without using a calculator, so the calculator does not just calculate the conversion, rather it tries to demonstrate the process of approximation in your head. In the end, I decided to keep the original Javascript calculator with some updates rather than replacing it with the Python version.

Analytical Impedance Match with Python

I created a quick Python function to calculate the component values for an impedance match between two real (resistive) terminations using the technique taught in the Introduction to Impedance Matching course. Here is what the code ends up looking like, and it shows how useful Python can be for working as a "quick programmable calculator." In the old days, I might have been tempted to program my old HP48 calculator to crank out the same values. It only took a few minutes to put the code together, which is the beauty of working with Python.

LC Resonance Plotter

Another application of using Python to demonstrate RF concepts comes in the form of a calculator to plot L-C series reactance. This plot shows two useful concepts: resonance and the effect of parasitic capacitance or inductance. For a capacitor, the magnitude of the series reactance decreases with increasing frequency, while the opposite is true for an inductor. For a capacitor with parasitic inductance, there will come a point where the two reactances are equal in magnitude and cancel each other out. This point is the resonant frequency of the combined circuit.

Python Programming

Some time ago instructor Richard Ranson shared with me that he has been doing a fair amount of work with the Python programming language. Based on his suggestion I have started looking into it as well, and I'd like to offer a few general observations to give an overview for anyone wishing to start exploring on their own.

Subscribe to RSS - Python