Skip to content

Commit ac37f05

Browse files
authored
Increase tolerance used to determine a matrix is orthogonal (#382)
* Increase tolerance used to determine a matrix is orthogonal * Spell fix
1 parent 35df23a commit ac37f05

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/highdicom/spatial.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"""Default tolerance on the dot product to determine perpendicularity."""
2929

3030

31+
_DEFAULT_ORTHOGONAL_TOLERANCE = 1e-4
32+
"""Default tolerance on the matrix elements to determine orthogonality."""
33+
34+
3135
PATIENT_ORIENTATION_OPPOSITES = {
3236
PatientOrientationValuesBiped.L: PatientOrientationValuesBiped.R,
3337
PatientOrientationValuesBiped.R: PatientOrientationValuesBiped.L,
@@ -957,7 +961,7 @@ def get_closest_patient_orientation(affine: np.ndarray) -> tuple[
957961
def _is_matrix_orthogonal(
958962
m: np.ndarray,
959963
require_unit: bool = True,
960-
tol: float = _DEFAULT_EQUALITY_TOLERANCE,
964+
tol: float = _DEFAULT_ORTHOGONAL_TOLERANCE,
961965
) -> bool:
962966
"""Check whether a matrix is orthogonal.
963967

0 commit comments

Comments
 (0)