The lock-in calculates the magnitude output by using the following equation:
MAG = SquareRoot( (X * X) + ( Y * Y) )
and the signal phase using a form of Arctangent algorithm:
PHA = ArcTangent( Y/X) when X is positive and
PHA = ArcTangent( Y/X) + 180 when X is negative
Phase (when using the non floating-pont PHA command, i.e. without a following dot) is reported in centidegrees, so a value of say -4523 is equal to -45.23 degrees.
Using the above formula and the reported values of X and Y gives:
MAG = SquareRoot( (-9169 * -9169) + ( 3993 * 3993) )
= 10000
which agrees with the MAG value from the lock-in, and
PHA = ArcTangent(3993/-9169) + 180 (because X is negative)
= ArcTangent(3993/-9169) + 180
= 156.47 degrees
which agrees with the PHA value from the lock-in.
When using Excel to perform signal phase calculations on raw X, Y values, use the function ATAN2( X, Y) rather than ATAN(Y/X). The former works in the same way as the algorithm in the lock-in. To convert the response from these functions, which is in radians, into degrees, multiply by 180/pi