import numpy as np

"""
Explanation: In this short tutorial, we will load a few EEG signals, and see how we can get help dyconnmap's functions.

Load data
First things first. We are going to use scipy's io submodule to load our MATLAB workspace with some sample EEG signals.
End of explanation
"""


eeg = np.load('data/eeg_eyes_opened.npy')

fs = 160.0
num_trials = 101
num_samples_vis = 160 * 3

"""
Explanation: dyconnmap supports the standard NumPy arrays, so, it's up to the user to import the data. For example, one could load a Nifti file (using i.e. nibabel) and fetch the internal structure that is a standard numpy array.
End of explanation
"""


num_channels, num_samples = np.shape(eeg[0])

print(f"""
  trials: {num_trials}
channels: {num_channels}
 samples: {num_samples}
""")

eeg_ts = eeg[0]

"""
Explanation: After loading the data, inspect them; find out home many channels and samples are available.
End of explanation
"""


import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)

from dyconnmap.fc import iplv

"""
Explanation: dyconnmap and Help
dyconnmap's available submodules are 
* fc for functional connectivity
* graphs for graph analysis,
* cluster for clustering algorithms
* ts for (symbolic) time series
End of explanation
"""


help(iplv)

"""
Explanation: Most estimators' functions signatures rely on the same inputs. One can reference to the docstrings or simply read the whole documentation with the command (i.e.) help(iplv).
End of explanation
"""


