Skip to content

Analysis

analysis

Analysis and visualization for MTF validation.

Provides matched-filter MTF computation and plotting for validating Gabor filterbank tuning against Chi, Ru & Shamma (1999).

compute_matched_filter_mtf

compute_matched_filter_mtf(rsf_dict: dict) -> dict

Compute MTF by extracting each filter's response to its matched ripple.

Args: rsf_dict: {(rate, scale): RSF} for each ripple stimulus

Returns: dict with upward/downward matrices (raw magnitudes), rates, scales

plot_mtf_contour

plot_mtf_contour(rsf_dict: dict, title: str = 'Matched Filter MTF', figsize: tuple = (11, 5), cmap: str = 'gray', levels: int = 10, normalize: bool = True, interp_factor: int = 10) -> tuple

Plot matched filter MTF as contour plots.

plot_mtf_heatmap

plot_mtf_heatmap(rsf_dict: dict, title: str = 'Matched Filter MTF', figsize: tuple = (14, 6), cmap: str = 'viridis', normalize: bool = True, annot: bool = True) -> tuple

Plot matched filter MTF as heatmaps using seaborn.

plot_mtf_lines

plot_mtf_lines(rsf_dict: dict, title: str = 'MTF by Scale', figsize: tuple = (12, 5), normalize: bool = True) -> tuple

Plot response vs rate for each scale.

plot_mtf_1d

plot_mtf_1d(rsf_dict: dict, title: str = '1D MTF (SVD)', figsize: tuple = (12, 5), normalize: bool = True) -> tuple

Plot 1D spectral and temporal MTFs via SVD decomposition.