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

Note: in the below we use emCoordinateChnage[kappa, L] that computes
the coordinate change for an untwisted tensor. However, since all
coordinate changes are orientation preserving, we can also use the 
same routine to compute coordinate changes for twisted tensors.

For further description of emCoordinateChange[kappa,L], see kappaLib.m

Metaclass II

mat=(({{a1, -b1, 0, 0, 0, 0}, {b1, a1, 0, 0, 0, 0}, {0, 0, a2, 0, 0, -b2}, {0, 1, 0, a1, b1, 0}, {1, 0, 0, -b1, a1, 0}, {0, 0, b2, 0, 0, a2}}));
kappa=emMatrixToKappa[mat];

(* Define coordinate change and check that it is orientation preserving *)
jacobian=(({{1, 0, 0, 0}, {0, 0, -1, 0}, {0, 1, 0, 0}, {0, 0, 0, 1}}));
Det[jacobian]

kappaT=emCoordinateChange[kappa,jacobian];
emKappaToMatrix[kappaT]//MatrixForm

All entries remain the same except the two “1”-entries that are transformed into “-1”-entries.

Metaclass III

mat=(({{a1, -b1, 0, 0, 0, 0}, {b1, a1, 0, 0, 0, 0}, {1, 0, a1, 0, 0, -b1}, {0, 0, 0, a1, b1, 1}, {0, 0, 1, -b1, a1, 0}, {0, 1, b1, 0, 0, a1}}));
kappa=emMatrixToKappa[mat];

(* Define coordinate change and check that it is orientation preserving *)
jacobian=(({{1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, 1}}));
Det[jacobian]

kappaT=emCoordinateChange[kappa,jacobian];
emKappaToMatrix[kappaT]//MatrixForm

All entries remain the same except the two “1”-entries that are transformed into “-1”-entries.

Metaclass V

mat=(({{a1, -b1, 0, 0, 0, 0}, {b1, a1, 0, 0, 0, 0}, {0, 0, a2, 0, 0, a3}, {0, 1, 0, a1, b1, 0}, {1, 0, 0, -b1, a1, 0}, {0, 0, a3, 0, 0, a2}}));
kappa=emMatrixToKappa[mat];

(* Define coordinate change and check that it is orientation preserving *)
jacobian=(({{1, 0, 0, 0}, {0, 0, -1, 0}, {0, 1, 0, 0}, {0, 0, 0, 1}}));
Det[jacobian]

kappaT=emCoordinateChange[kappa,jacobian];
emKappaToMatrix[kappaT]//MatrixForm

All entries remain the same except the two “1”-entries that are transformed into “-1”-entries.