I tried to replicate the S-parameter retrieval from the paper from Smith. I got the following responses. I got exactly the same plot for magnitude plot. And even phase plot using cang_rad(), but it was inverted. What I mean is, when I created a output variable with
-cang_rad(). I got exactly the same phase plot that is given in the paper. And I attached the images.
Is there any reason for taking negative of the phase plot or am I missing anything?