diff --git a/notebooks/run_visbrain.py b/notebooks/run_visbrain.py index 7e30d8cb..d06319c6 100644 --- a/notebooks/run_visbrain.py +++ b/notebooks/run_visbrain.py @@ -1,5 +1,6 @@ """This file shows how to use YASA in combination with Visbrain. """ + import numpy as np from visbrain.gui import Sleep from yasa import spindles_detect, sw_detect diff --git a/yasa/detection.py b/yasa/detection.py index fbcd224d..9d9bcac2 100644 --- a/yasa/detection.py +++ b/yasa/detection.py @@ -6,6 +6,7 @@ - GitHub: https://github.com/raphaelvallat/yasa - License: BSD 3-Clause License """ + import mne import logging import numpy as np diff --git a/yasa/features.py b/yasa/features.py index 34005048..cd2773e2 100644 --- a/yasa/features.py +++ b/yasa/features.py @@ -16,6 +16,7 @@ DANGER: This function has not been extensively debugged and validated. Use at your own risk. """ + import mne import yasa import logging diff --git a/yasa/heart.py b/yasa/heart.py index 9881b66c..fe7447e0 100644 --- a/yasa/heart.py +++ b/yasa/heart.py @@ -4,6 +4,7 @@ Author: Dr Raphael Vallat , UC Berkeley. Date: May 2022 """ + import logging import numpy as np import pandas as pd diff --git a/yasa/hypno.py b/yasa/hypno.py index d67bf825..fbe7ba2b 100644 --- a/yasa/hypno.py +++ b/yasa/hypno.py @@ -1,6 +1,7 @@ """ Hypnogram-related functions and class. """ + import mne import logging diff --git a/yasa/io.py b/yasa/io.py index b9a6be55..1e0aaf5b 100644 --- a/yasa/io.py +++ b/yasa/io.py @@ -1,5 +1,6 @@ """Helper functions for YASA (e.g. logger) """ + import logging diff --git a/yasa/numba.py b/yasa/numba.py index ff9062d2..42c153fe 100644 --- a/yasa/numba.py +++ b/yasa/numba.py @@ -1,6 +1,7 @@ """ This file contains Numba-accelerated functions used in the main detections. """ + import numpy as np from numba import jit diff --git a/yasa/others.py b/yasa/others.py index 2a1c6a0b..af809289 100644 --- a/yasa/others.py +++ b/yasa/others.py @@ -1,6 +1,7 @@ """ This file contains several helper functions to manipulate 1D and 2D EEG data. """ + import logging import numpy as np from scipy.interpolate import interp1d diff --git a/yasa/plotting.py b/yasa/plotting.py index d8c6b05e..6f544e19 100644 --- a/yasa/plotting.py +++ b/yasa/plotting.py @@ -1,6 +1,7 @@ """ Plotting functions of YASA. """ + import mne import numpy as np import pandas as pd diff --git a/yasa/sleepstats.py b/yasa/sleepstats.py index a174b4c9..5988350b 100644 --- a/yasa/sleepstats.py +++ b/yasa/sleepstats.py @@ -2,6 +2,7 @@ This file contains several helper functions to calculate sleep statistics from a one-dimensional sleep staging vector (hypnogram). """ + # import warnings import numpy as np import pandas as pd diff --git a/yasa/spectral.py b/yasa/spectral.py index 374835fd..f675d582 100644 --- a/yasa/spectral.py +++ b/yasa/spectral.py @@ -2,6 +2,7 @@ This file contains several helper functions to calculate spectral power from 1D and 2D EEG data. """ + import mne import logging import numpy as np diff --git a/yasa/staging.py b/yasa/staging.py index 6a0b0b09..7b6df764 100644 --- a/yasa/staging.py +++ b/yasa/staging.py @@ -1,4 +1,5 @@ """Automatic sleep staging of polysomnography data.""" + import os import mne import glob diff --git a/yasa/tests/test_detection.py b/yasa/tests/test_detection.py index 333e006c..a9abb223 100644 --- a/yasa/tests/test_detection.py +++ b/yasa/tests/test_detection.py @@ -1,4 +1,5 @@ """Test the functions in yasa/spectral.py.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_heart.py b/yasa/tests/test_heart.py index 873aeb3f..0f3a3831 100644 --- a/yasa/tests/test_heart.py +++ b/yasa/tests/test_heart.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/heart.py file.""" + import unittest import numpy as np from yasa.heart import hrv_stage diff --git a/yasa/tests/test_hypno.py b/yasa/tests/test_hypno.py index 1c8a2e43..bb7cb12f 100644 --- a/yasa/tests/test_hypno.py +++ b/yasa/tests/test_hypno.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/hypno.py file.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_hypnoclass.py b/yasa/tests/test_hypnoclass.py index 74d166df..7adf4fdb 100644 --- a/yasa/tests/test_hypnoclass.py +++ b/yasa/tests/test_hypnoclass.py @@ -1,4 +1,5 @@ """Test the class Hypnogram.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_io.py b/yasa/tests/test_io.py index 952a2d30..486a5984 100644 --- a/yasa/tests/test_io.py +++ b/yasa/tests/test_io.py @@ -1,4 +1,5 @@ """Test I/O.""" + import pytest import logging import unittest diff --git a/yasa/tests/test_numba.py b/yasa/tests/test_numba.py index ced33aff..b9533a86 100644 --- a/yasa/tests/test_numba.py +++ b/yasa/tests/test_numba.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/numba.py file.""" + import unittest import numpy as np from scipy.signal import detrend diff --git a/yasa/tests/test_others.py b/yasa/tests/test_others.py index 478e6bc5..a5d58304 100644 --- a/yasa/tests/test_others.py +++ b/yasa/tests/test_others.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/others.py file.""" + import mne import unittest import numpy as np diff --git a/yasa/tests/test_plotting.py b/yasa/tests/test_plotting.py index cb38b1b6..330c59a3 100644 --- a/yasa/tests/test_plotting.py +++ b/yasa/tests/test_plotting.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/plotting.py file.""" + import pytest import unittest import numpy as np diff --git a/yasa/tests/test_sleepstats.py b/yasa/tests/test_sleepstats.py index fb107618..cda53733 100644 --- a/yasa/tests/test_sleepstats.py +++ b/yasa/tests/test_sleepstats.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/sleepstats.py file.""" + import unittest import numpy as np import pandas as pd diff --git a/yasa/tests/test_spectral.py b/yasa/tests/test_spectral.py index dc937b88..458b3009 100644 --- a/yasa/tests/test_spectral.py +++ b/yasa/tests/test_spectral.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/spectral.py file.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_staging.py b/yasa/tests/test_staging.py index a87edd80..8a07629a 100644 --- a/yasa/tests/test_staging.py +++ b/yasa/tests/test_staging.py @@ -1,4 +1,5 @@ """Test the functions in yasa/staging.py.""" + import mne import unittest import numpy as np