Square, angular

Attention

To run locally, the code for these interactive demos requires a Jupyter Notebook environment, and the Panel extension.

Square, angular#

stimupy.stimuli.waves.square_angular()

import param

class SquareAngularParams(param.Parameterized):
    # Image size parameters
    height = param.Integer(default=10, bounds=(1, 20), doc="Height in degrees")
    width = param.Integer(default=10, bounds=(1, 20), doc="Width in degrees")
    ppd = param.Integer(default=20, bounds=(1, 40), doc="Pixels per degree")

    frequency = param.Number(default=8, bounds=(4, 20), step=1, doc="Frequency")
    phase_shift = param.Number(default=0, bounds=(0, 360), step=1, doc="Phase shift in degrees")
    rotation = param.Number(default=0, bounds=(0, 360), step=1, doc="Rotation in degrees")
    intensity_segments_low = param.Number(default=0, bounds=(0, 1), step=0.01, doc="Low segment intensity")
    intensity_segments_high = param.Number(default=1, bounds=(0, 1), step=0.01, doc="High segment intensity")
    origin = param.Selector(default="mean", objects=["mean", "corner", "center"], doc="Origin")

    def get_stimulus_params(self):
        return {
            "visual_size": (self.height, self.width),
            "ppd": self.ppd,
            "frequency": self.frequency,
            "phase_shift": self.phase_shift,
            "rotation": self.rotation,
            "intensity_segments": (self.intensity_segments_low, self.intensity_segments_high),
            "origin": self.origin,
        }
from stimupy.stimuli.waves import square_angular
from stimupy._docs.display_stimulus import InteractiveStimDisplay

# Create and display the interactive square_angular
square_angular_params = SquareAngularParams()
disp = InteractiveStimDisplay(square_angular, square_angular_params)
disp.layout