pylissom.utils¶
Submodules¶
pylissom.utils.helpers module¶
pylissom.utils.orientation_maps module¶
Provides some helpers to calculate Orientation Preferences of a Lissom Network
pylissom.utils.stimuli module¶
Provides several functions that create and manipulate matrices representing different stimuli, mainly guassians disks TODO: only use cv2 or scikit-image, not both
-
pylissom.utils.stimuli.
generate_gaussian
(shape, mu_x=0.0, mu_y=0.0, sigma_x=1.0, sigma_y=None)[source]¶
-
pylissom.utils.stimuli.
rotations
(img, num=13)[source]¶ Returns: Returns a dictionary of len 180 / num, representing {rotation_degrees: rotated_img}
-
pylissom.utils.stimuli.
gaussian_generator
(size, mu_x, mu_y, sigma_x, sigma_y, orientation)[source]¶ Parameters: orientation – It’s actually redundant because orientation is a function of the sigmas, but make it easier to use Returns: A numpy matrix representing a gaussian of shape = (size, size)
-
pylissom.utils.stimuli.
generate_random_gaussian
(size)[source]¶ Returns: A numpy matrix with a random gaussian of shape = (size, size)
-
pylissom.utils.stimuli.
random_gaussians_generator
(size, gaussians=1)[source]¶ Parameters: - size – img will have shape = (size, size)
- gaussians – How many gaussians per matrix
Returns: Yields a squared numpy matrix with gaussians disks
-
pylissom.utils.stimuli.
generate_three_dots
(size, mu_x, mu_y, sigma_x, orientation)[source]¶ Returns: A numpy matrix with 3 gaussian disks representing a face
-
pylissom.utils.stimuli.
faces_generator
(size, num=1)[source]¶ Parameters: - size – img will have shape = (size, size)
- gaussians – How many faces per matrix
Returns: Yields a squared numpy matrix with 3-gaussians faces