Skip to content

Commit d2403fa

Browse files
[ENH] Increase tolerance for comparing qforms
- Avoids unnecessary warning
1 parent 8256530 commit d2403fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

niworkflows/interfaces/images.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def _run_interface(self, runtime):
609609
# Set qform
610610
qform = refhdr.get_qform()
611611
qcode = int(refhdr["qform_code"])
612-
if not np.allclose(qform, imghdr.get_qform()):
612+
if not np.allclose(qform, imghdr.get_qform(), atol=1e-2): # tolerance of 0.01 mm
613613
LOGGER.warning("q-forms of reference and mask are substantially different")
614614
imghdr.set_qform(qform, qcode)
615615

0 commit comments

Comments
 (0)