SetDirectory["~/writing/WIP/KappaLib/"];
<<kappaLib.m

vars={xi0,xi1,xi2,xi3};

Example 5.4

Medium 1

A1=(({{0, -1, 1}, {-1, -2, 1}, {1, 1, -1}}));
B1=(({{0, (1/2), 0}, {(1/2), 0, 0}, {0, 0, 0}}));
C1=(({{0, 0, 0}, {0, 2, 1}, {(1/2), -(1/2), 1}}));
D1=Transpose[C1];
kappa1=emABCDToKappa[A1,B1,C1,D1];
Simplify[emKappaToFresnel[kappa1,vars]]

Medium 2

L={{1,0,0,0},{0,0,1,0},{0,1,0,0},{0,0,0,1}};
L//MatrixForm
kappa2 = emCoordinateChange[kappa1,L];
Simplify[emKappaToFresnel[kappa2,vars]]

The two media have the same Fresnel surfaces, but their Tamm-Rubilar tensor densities do not coincide

ABCD representation for medium 2

{A2,B2,C2,D2}=emKappaToABCD[kappa2];
A2//MatrixForm
B2//MatrixForm
C2//MatrixForm
C2-Transpose[D2]//MatrixForm

Determinants

emDet[kappa1]
emDet[kappa2]
emTrace[kappa1]
emTrace[kappa2]

Compute trace-free parts

kappa1T0 = kappa1-emIdentityKappa[];
kappa2T0 = kappa2-emIdentityKappa[];

emTrace[kappa1T0]
emTrace[kappa2T0]

emDet[kappa1T0]
emDet[kappa2T0]

Extra:

Eigenvalues[emKappaToMatrix[kappa1]]
Eigenvalues[emKappaToMatrix[kappa2]]

Eigenvalues[emKappaToMatrix[emHodge[DiagonalMatrix[{-1,1,1,1}]]]]