LTspice and Bridge

capture_001_24062014_191340

This is a simulation by LTspice for an impedance bridge, where the DUT is an inductor of 1uH and the frequency of the input signal is 7MHz.

figure_1

We put the simulated waveform of V1 and V2 into a Python program.

bridgeL

We see that Z(DUT)=(0.00903879437834+44.0103397701j), and because X(DUT)=2.0*3.14*7MHz*1uH=43.96 [ohm], it seems that the program is working fine.