From 9d800e5654bc581130edcd338b72cfdb62840f0f Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sun, 8 May 2022 08:58:12 +0200 Subject: [PATCH] fix: snirf length units --- mne/io/snirf/_snirf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mne/io/snirf/_snirf.py b/mne/io/snirf/_snirf.py index b5763d69fbd..95beede6f8d 100644 --- a/mne/io/snirf/_snirf.py +++ b/mne/io/snirf/_snirf.py @@ -441,18 +441,18 @@ def _get_timeunit_scaling(time_unit): return scalings[time_unit] else: raise RuntimeError(f'The time unit {time_unit} is not supported by ' - 'MNE. Please report this error as a GitHub' + 'MNE. Please report this error as a GitHub ' 'issue to inform the developers.') def _get_lengthunit_scaling(length_unit): """MNE expects distance in m, return required scaling.""" - scalings = {'cm': 100, 'mm': 1000} + scalings = {'m': 1, 'cm': 100, 'mm': 1000} if length_unit in scalings: return scalings[length_unit] else: - raise RuntimeError(f'The time unit {length_unit} is not supported by ' - 'MNE. Please report this error as a GitHub' + raise RuntimeError(f'The length unit {length_unit} is not supported ' + 'by MNE. Please report this error as a GitHub ' 'issue to inform the developers.')