Beispiel #1
0
DE = 2  # how many 10s epochs to display
epoch = 53
ptepoch = 10 * int(rec.attrs['sample_frequency'])
dp = int(0.5 * ptepoch)
# stacklineplot.stackplot(signals[ch0:ch1,epoch*ptepoch+dp:(epoch+DE)*ptepoch+dp],secondsk=DE*10.0, ylabels=electrode_labels[ch0:ch1], yscale=0.3)
print("epoch:", epoch)

# %%
matplotlib.rcParams['figure.figsize'] = (18.0, 12.0)

# %% slideshow={"slide_type": "slide"}
# search identified spasms at 1836, 1871, 1901, 1939
stacklineplot.show_epoch_centered(signals,
                                  1836,
                                  epoch_width_sec=15,
                                  chstart=0,
                                  chstop=19,
                                  fs=rec.attrs['sample_frequency'],
                                  ylabels=electrode_labels,
                                  yscale=3.0)

# %% slideshow={"slide_type": "slide"}
electrode_labels
r_labels = [ss.replace('EEG ', '') for ss in electrode_labels]
r_labels

# %% slideshow={"slide_type": "slide"}
montageview.DB_LABELS

# %% slideshow={"slide_type": "slide"}
monv = montageview.MontageView(montageview.DB_LABELS, r_labels)
Beispiel #2
0
# @chstop    which channel to end
# @labels_by_channel
# @yscale
# @fs sample frequency (num samples per second)
# File:      ~/code/eegml/eegvis/eegvis/stacklineplot.py
# Type:      function
#     ```

# %%
# the simpliest thing you can do is display the eeg as it is recorded

stacklineplot.show_epoch_centered(
    signals,
    goto_sec,
    epoch_width_sec,
    fs=FS,
    chstart=chstart,
    chstop=chstop,
    ylabels=ylabels,
)

#%%
stacklineplot.show_epoch_centered(
    signals,
    goto_sec,
    epoch_width_sec,
    fs=FS,
    chstart=chstart,
    chstop=chstop,
    ylabels=ylabels,
    ysensitivity=10.0,
# @chstart   which channel to start
# @chstop    which channel to end
# @labels_by_channel
# @yscale
# @fs sample frequency (num samples per second)
# File:      ~/code/eegml/eegvis/eegvis/stacklineplot.py
# Type:      function
#     ```

# %%
# the simpliest thing you can do is display the eeg as it is recorded

stacklineplot.show_epoch_centered(signals,
                                  goto_sec,
                                  epoch_width_sec,
                                  fs=FS,
                                  chstart=chstart,
                                  chstop=chstop,
                                  ylabels=ylabels)

# %%
signals = hf.phys_signals
goto_sec = 15.0  # note since this centered here, to show first 10 seconds need to set this to 5 or epoch_width_sec/2
epoch_width_sec = 30.0  #seconds
FS = hf.sample_frequency
chstart = 0
chstop = 19
ylabels = hf.shortcut_elabels
yscale = 1.0

# %%