@@ -56,22 +56,18 @@ def respiratory_variance_time(
5656 data ._metadata ["peaks" ] = peaks
5757 data ._metadata ["troughs" ] = troughs
5858 else :
59- raise ValueError (
60- """
59+ raise ValueError ("""
6160 To use this function you should either provide a Physio object
6261 with existing peaks and troughs metadata (e.g. using the peakdet module), or
6362 by providing the physiological data timeseries, the sampling frequency,
6463 and the peak and trough indices separately.
65- """
66- )
64+ """ )
6765 if data .peaks .size == 0 or data .troughs .size == 0 :
68- raise ValueError (
69- """
66+ raise ValueError ("""
7067 Peaks and troughs must be non-empty lists.
7168 Make sure to run peak/trough detection on your physiological data first,
7269 using the peakdet module, or other software of your choice.
73- """
74- )
70+ """ )
7571
7672 timestep = 1 / data .fs
7773 # respiration belt timing
@@ -219,14 +215,12 @@ def _respiratory_pattern_variability(data, window):
219215 elif fs is not None :
220216 data = io .load_physio (data , fs = fs )
221217 else :
222- raise ValueError (
223- """
218+ raise ValueError ("""
224219 To use this function you should either provide a Physio object
225220 with the sampling frequency encapsulated, or
226221 by providing the physiological data timeseries and the sampling
227222 frequency separately.
228- """
229- )
223+ """ )
230224
231225 # Convert window to Hertz
232226 window = int (window * data .fs )
@@ -288,14 +282,12 @@ def respiratory_variance(data, fs=None, window=6, **kwargs):
288282 elif fs is not None :
289283 data = io .load_physio (data , fs = fs )
290284 else :
291- raise ValueError (
292- """
285+ raise ValueError ("""
293286 To use this function you should either provide a Physio object
294287 with the sampling frequency encapsulated, or
295288 by providing the physiological data timeseries and the sampling
296289 frequency separately.
297- """
298- )
290+ """ )
299291
300292 # Convert window to Hertz
301293 halfwindow_samples = int (round (window * data .fs / 2 ))
@@ -338,14 +330,12 @@ def respiratory_phase(data, n_scans, slice_timings, t_r, fs=None, **kwargs):
338330 elif fs is not None :
339331 data = io .load_physio (data , fs = fs )
340332 else :
341- raise ValueError (
342- """
333+ raise ValueError ("""
343334 To use this function you should either provide a Physio object
344335 with the sampling frequency encapsulated, or
345336 by providing the physiological data timeseries and the sampling
346337 frequency separately.
347- """
348- )
338+ """ )
349339
350340 assert slice_timings .ndim == 1 , "Slice times must be a 1D array"
351341 n_slices = np .size (slice_timings )
0 commit comments