Hi,
I have just discovered a bug in xCoba. This is in the computation of the epsilon tensor associated to a CTensor metric (by the way, the CTensor approach is so easy compared to the old way :)
In xCoba.nb, Sec. 4.4.3, we have the code:
(computation : epsilon[CTensor[matrix_?MatrixQ, {-basis_, -basis_},
addweight_]]) ^:= xCobaCache[
computation,
With[{dim = Length[matrix]},
CTensor[Sqrt[Det[matrix]] LeviCivitaTensor[dim],
ConstantArray[-basis, {dim}], addweight]
] ];
The important thing to note is the factor of Sqrt[Det[matrix]]. Currently this only makes sense for a Riemannian metric. If however we have a Lorentzian metric (or a degenerate metric?) then this expression will be incorrect.
Perhaps a quick fix for now would be to use Sqrt@Abs@Det@matrix.
A slightly better approach would be to give a definition to
SignDetOfMetric[CTensor[...]].
Currently, SignDetOfMetric will complain if you feed it a CTensor metric. It might in general be complicated to automatically determine the sign from a complicated coordinate expression ... but it should at least be possible for the user to specify what the signature is. That could be an option in SetCMetric, for example, which would then assign a value to SignDetOfMetric[met].
Cheers
Leo