EEG Visualization¶
Requires: pip install aime-loc[eeg,viz]
PSD Plot¶
psd_plot(epochs, *, log_scale=True, title=None, show=True, save=None, dpi=300, figsize=(12, 5), **kwargs)
¶
Plot average Power Spectral Density across epochs.
Shows the mean PSD with shaded standard deviation band. Useful for inspecting signal quality and frequency content before sending to the server for TC scoring.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epochs
|
EpochSet
|
:class: |
required |
log_scale
|
bool
|
Use log scale for power axis. |
True
|
title
|
str | None
|
Chart title. |
None
|
show
|
bool
|
Display the chart interactively. |
True
|
save
|
str | None
|
Path to save the figure. |
None
|
dpi
|
int
|
Resolution for saved figures. |
300
|
figsize
|
tuple[float, float]
|
Figure size in inches. |
(12, 5)
|
Returns:
| Type | Description |
|---|---|
Any
|
class: |
Time Series Plot¶
timeseries_plot(epochs, profile=None, *, functions=None, title=None, show=True, save=None, dpi=300, figsize=(14, 6), **kwargs)
¶
Plot band power time series across epochs.
Shows how the total PSD power evolves over time. If a profile is provided, annotates with overall TC score.
Plots the mean PSD power per epoch as a time series, giving researchers an overview of signal stability across the recording.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epochs
|
EpochSet
|
:class: |
required |
profile
|
EEGCognitiveProfile | None
|
Optional :class: |
None
|
functions
|
list[str] | None
|
Subset of function names to plot (default: base 8 only). |
None
|
title
|
str | None
|
Chart title. |
None
|
show
|
bool
|
Display the chart interactively. |
True
|
save
|
str | None
|
Path to save the figure. |
None
|
dpi
|
int
|
Resolution for saved figures. |
300
|
figsize
|
tuple[float, float]
|
Figure size in inches. |
(14, 6)
|
Returns:
| Type | Description |
|---|---|
Any
|
class: |
Cognitive Radar Chart¶
cognitive_radar(profiles, *, title=None, show=True, save=None, dpi=300, figsize=(10, 10), journal='default', **kwargs)
¶
Generate 13-axis radar chart for one or more EEG cognitive profiles.
Reuses the same visual language as the LLM radar chart, enabling direct visual comparison of human EEG and AI cognitive signatures.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profiles
|
EEGCognitiveProfile | list[EEGCognitiveProfile]
|
One or more :class: |
required |
title
|
str | None
|
Chart title (auto-generated if |
None
|
show
|
bool
|
Display the chart interactively. |
True
|
save
|
str | None
|
Path to save the figure. |
None
|
dpi
|
int
|
Resolution for saved figures. |
300
|
figsize
|
tuple[float, float]
|
Figure size in inches. |
(10, 10)
|
journal
|
str
|
Style preset — |
'default'
|
Returns:
| Type | Description |
|---|---|
Any
|
class: |
Example::
profile = eeg.score(epochs)
cognitive_radar(profile, save="eeg_radar.png")
# Compare two subjects
cognitive_radar([profile_a, profile_b])
Scalp Topomap¶
topomap(recording, *, band='alpha', title=None, show=True, save=None, dpi=300, figsize=(8, 6), **kwargs)
¶
Plot scalp topographic map of band power distribution.
Requires MNE for montage information. If the recording has standard 10-20 channel positions, a full topomap is displayed. Otherwise, falls back to a bar chart of per-channel power.
Note: This plots LOCAL band power distribution across the scalp. The cognitive function mapping (Phi-Power) is server-side IP and is NOT revealed here. Standard EEG frequency bands are used for the topographic display only.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recording
|
EEGRecording
|
:class: |
required |
band
|
str
|
Standard EEG band for display — |
'alpha'
|
title
|
str | None
|
Chart title. |
None
|
show
|
bool
|
Display the chart interactively. |
True
|
save
|
str | None
|
Path to save the figure. |
None
|
dpi
|
int
|
Resolution for saved figures. |
300
|
figsize
|
tuple[float, float]
|
Figure size in inches. |
(8, 6)
|
Returns:
| Type | Description |
|---|---|
Any
|
class: |