On Sat, Dec 21, 2019 at 12:30 AM, <erik@...> wrote:
Look in the source code of nanoVNA-saver on github
There might be a slight error in Rune's S21 compensation.
Looking at his code, he defines the Thru's impairment as:
gammaThrough = np.exp(np.complex(0, 1) * 2 * 2 * math.pi * self.throughLength * f * -1)
I believe there should only be a single '2' in the exponent (i.e. 2pi, not 4pi) because, for the S21 measurement, the signal only travels one time through the thru. I.e. the Thru's delay is e^(-j2pi*length(sec)*F(hz)), unlike the one-port SOL standards where there is a trip from the reference plane to the actual S, O, or L, and then back again to the reference plane (and thus the -j2pi*length*F delay term is doubled).
Apart from that, I think his equations look good (although I would have chosen a different name for gammaThrough, because this is a Transmission parameter, not a Reflection parameter. But very minor nit).
Anyway -- I'm certainly no expert in the12-term correction equations. Others more knowledgeable might want to speak.
- Jeff, k6jca