AnimalPlotter#
- class neurodent.visualization.AnimalPlotter(war: WindowAnalysisResult, save_fig: bool = False, save_path: Path | None = None) None[source]#
Bases:
AnimalFeatureParser- Parameters:
war (WindowAnalysisResult)
save_fig (bool)
save_path (Path)
- __init__(war: WindowAnalysisResult, save_fig: bool = False, save_path: Path | None = None) None[source]#
- Parameters:
war (WindowAnalysisResult)
save_fig (bool)
save_path (Path | None)
- Return type:
None
- plot_coherecorr_matrix(groupby='animalday', bands=None, figsize=None, cmap='viridis', **kwargs)[source]#
- plot_linear_temporal(multiindex=['animalday', 'animal', 'genotype'], features: list[str] | None = None, channels: list[int] | None = None, figsize=None, score_type='z', show_endfile=False, **kwargs)[source]#
- Parameters:
features (list[str] | None)
channels (list[int] | None)
- plot_coherecorr_spectral(multiindex=['animalday', 'animal', 'genotype'], features: list[str] | None = None, figsize=None, score_type='z', cmap='bwr', triag=True, show_endfile=False, duration_name='duration', endfile_name='endfile', **kwargs)[source]#
- Parameters:
features (list[str] | None)
- plot_psd_histogram(groupby='animalday', figsize=None, avg_channels=False, plot_type='loglog', plot_slope=True, xlim=None, **kwargs)[source]#
- plot_psd_spectrogram(multiindex=['animalday', 'animal', 'genotype'], freq_range=(1, 50), center_stat='mean', mode='z', figsize=None, cmap='magma', **kwargs)[source]#
- plot_temporal_heatmap(features: list[str] | str | None = None, figsize=None, cmap='viridis', score_type=None, norm=None, **kwargs)[source]#
Create temporal heatmap showing feature patterns over time.
Creates a heatmap where: - X-axis: Time of day (timestamp mod 24h) - Y-axis: Days - Color: Feature values (flattened across channels)
- Parameters:
features (
list[str], optional) – List of features to plot. If None, uses non-band linear features.figsize (
tuple, optional) – Figure size (width, height)cmap (
str, optional) – Colormap for the heatmapscore_type (
str, optional) – Standardization method for feature valuesnorm (
matplotlib.colors.Normalize, optional) – Normalization object for the colormap. If None, uses default normalization. Common options: - matplotlib.colors.Normalize(vmin=0, vmax=1) # Fixed range - matplotlib.colors.CenteredNorm(vcenter=0) # Auto-detect range around 0 - matplotlib.colors.LogNorm() # Logarithmic scale**kwargs – Additional arguments passed to matplotlib