API#

Pooling Windows object#

The main object you will interact with is PoolingWindows which will create and plot the generated windows. Additionally, create_pooling_windows will return the angle and eccentricity windows without the added functionality of PoolingWindows.

PoolingWindows

Generic class to set up and visualize foveated pooling windows.

create_pooling_windows

Create two sets of 2d pooling windows that span the visual field.

Pooling#

These are additional helper functions related to creating pooling windows. The two window types are gaussian and raised_cosine. Additionally, normalize_windows is helpful for ensuring that varying eccentricities of create_pooling_windows all contribute equally.

gaussian

Compute simple gaussian with mean 0, and adjustable std dev.

raised_cosine

Compute raised cosine window function.

normalize_windows

Normalize windows to have L1-norm of 1.

Calculate#

Methods for computing conversions, from degrees to pixels (deg_to_pix) and calculating a specific scaling value based on a required number of windows and eccentricity ranges (scaling).

scaling

Calculate and return the scaling value, as reported in the paper.

deg_to_pix

Calculate the degree-to-pixel conversion factor.

Sampling#

When creating pooling windows, it is important to ensure that any sampling does not result in aliasing, in which there are incorrect measurements in the reconstructed signal. These methods allow you to check this property using a specified function, domain, and how to sample that domain. Furthermore, you can visualize interpolation coefficients and resulting signals.

check_sampling

Check how sampling relates to interpolation quality.

plot_coeffs

Plot interpolation coefficients.

interpolation_plot

Create plot showing interpolation results at specified pixel or value.

create_movie

Create movie showing the interpolation results.