Hi Nikhil,
Instead of comparing the phase of the Rx signal to the Tx signal in time domain, it was done in the frequency domain. This is the reason why DFT is being used. The native data that can be extracted from the DFT is imaginary and real spectrum. Wherein the phase and magnitude information, which are more meaningful, are just derived from it. The gain factor is a functionality to correct the error in terms of loss in amplitude due to varying frequencies and parasitic resistances that exist outside the DUT. Knowing the behavior on these two factors allows us to determine the coefficients needed to linearize our impedance vs frequency curve.
Best Regards
Louijie