diff --git a/yasa/staging.py b/yasa/staging.py index aeca3be..6a0b0b0 100644 --- a/yasa/staging.py +++ b/yasa/staging.py @@ -201,7 +201,12 @@ def __init__(self, raw, eeg_name, *, eog_name=None, emg_name=None, metadata=None # Extract duration of recording in minutes duration_minutes = data.shape[1] / sf / 60 - assert duration_minutes >= 5, "At least 5 minutes of data is required." + if duration_minutes < 5: + msg = ( + "Insufficient data. A minimum of 5 minutes of data is recommended " + "otherwise results may be unreliable." + ) + logger.warning(msg) # Add to self self.sf = sf