CompareRelative
- Workspace.CompareRelative(self: pyarts.arts._Workspace, var1: pyarts.arts.WorkspaceVariable | pyarts.arts.ArrayOfArrayOfMatrix | pyarts.arts.ArrayOfArrayOfPropagationMatrix | pyarts.arts.ArrayOfArrayOfStokesVector | pyarts.arts.ArrayOfArrayOfTensor3 | pyarts.arts.ArrayOfArrayOfTensor6 | pyarts.arts.ArrayOfArrayOfVector | pyarts.arts.ArrayOfMatrix | pyarts.arts.ArrayOfPropagationMatrix | pyarts.arts.ArrayOfStokesVector | pyarts.arts.ArrayOfTensor3 | pyarts.arts.ArrayOfTensor4 | pyarts.arts.ArrayOfTensor6 | pyarts.arts.ArrayOfTensor7 | pyarts.arts.ArrayOfVector | pyarts.arts.EnergyLevelMap | pyarts.arts.Matrix | pyarts.arts.Numeric | pyarts.arts.PropagationMatrix | pyarts.arts.StokesVector | pyarts.arts.Tensor3 | pyarts.arts.Tensor4 | pyarts.arts.Tensor5 | pyarts.arts.Tensor6 | pyarts.arts.Tensor7 | pyarts.arts.Vector, var2: pyarts.arts.WorkspaceVariable | pyarts.arts.ArrayOfArrayOfMatrix | pyarts.arts.ArrayOfArrayOfPropagationMatrix | pyarts.arts.ArrayOfArrayOfStokesVector | pyarts.arts.ArrayOfArrayOfTensor3 | pyarts.arts.ArrayOfArrayOfTensor6 | pyarts.arts.ArrayOfArrayOfVector | pyarts.arts.ArrayOfMatrix | pyarts.arts.ArrayOfPropagationMatrix | pyarts.arts.ArrayOfStokesVector | pyarts.arts.ArrayOfTensor3 | pyarts.arts.ArrayOfTensor4 | pyarts.arts.ArrayOfTensor6 | pyarts.arts.ArrayOfTensor7 | pyarts.arts.ArrayOfVector | pyarts.arts.EnergyLevelMap | pyarts.arts.Matrix | pyarts.arts.Numeric | pyarts.arts.PropagationMatrix | pyarts.arts.StokesVector | pyarts.arts.Tensor3 | pyarts.arts.Tensor4 | pyarts.arts.Tensor5 | pyarts.arts.Tensor6 | pyarts.arts.Tensor7 | pyarts.arts.Vector, maxabsreldiff: pyarts.arts.WorkspaceVariable | pyarts.arts.Numeric, error_message: pyarts.arts.WorkspaceVariable | pyarts.arts.String | None = '', verbosity: pyarts.arts.WorkspaceVariable | pyarts.arts.Verbosity | None = self.verbosity) None
Checks the consistency between two variables by their relative values.
The two variables are checked to not deviate outside the specified relative value (
maxabsreldiff
). An error is issued if this is not fulfilled.The main application of this method is to be part of the test control files, and then used to check that a calculated value is consistent with an old, reference, value.
If either value is 0.0, the relative error is considered as 0 for easier use. This really means infinite differences, though allowing zero-crossings is useful for plenty of tests. So Be Aware!
If both
var1
andvar2
are non-zero, the difference is evaluated as: abs(var1/var2-1) That is,var2
is taken as the reference value.Author(s): Oliver Lemke, Richard Larsson
- Parameters:
var1 (Numeric or Vector or Matrix or Tensor3 or Tensor4 or Tensor5 or Tensor6 or Tensor7 or ArrayOfVector or ArrayOfMatrix or ArrayOfTensor3 or ArrayOfTensor4 or ArrayOfTensor6 or ArrayOfTensor7 or ArrayOfArrayOfVector or ArrayOfArrayOfMatrix or ArrayOfArrayOfTensor3 or ArrayOfArrayOfTensor6 or ArrayOfPropagationMatrix or ArrayOfArrayOfPropagationMatrix or ArrayOfStokesVector or ArrayOfArrayOfStokesVector or EnergyLevelMap or PropagationMatrix or StokesVector) – A first variable. [IN]
var2 (Numeric or Vector or Matrix or Tensor3 or Tensor4 or Tensor5 or Tensor6 or Tensor7 or ArrayOfVector or ArrayOfMatrix or ArrayOfTensor3 or ArrayOfTensor4 or ArrayOfTensor6 or ArrayOfTensor7 or ArrayOfArrayOfVector or ArrayOfArrayOfMatrix or ArrayOfArrayOfTensor3 or ArrayOfArrayOfTensor6 or ArrayOfPropagationMatrix or ArrayOfArrayOfPropagationMatrix or ArrayOfStokesVector or ArrayOfArrayOfStokesVector or EnergyLevelMap or PropagationMatrix or StokesVector) – A second variable. [IN]
maxabsreldiff (Numeric) – Threshold for maximum relative difference. [IN]
error_message (String, optional) – Additional error message. Defaults to
""
[IN]verbosity (Verbosity) – ARTS verbosity. See
verbosity
, defaults toself.verbosity
[IN]