Attention
To run locally, the code for these interactive demos requires a Jupyter Notebook environment, and the Panel extension.
Bessel#
stimupy.components.waves.bessel()
import param
class BesselParams(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=1, bounds=(0, 2), step=0.01, doc="")
order = param.Integer(default=0, bounds=(0, 5), doc="")
intensity_center = param.Number(default=1, bounds=(0, 1), step=0.01, doc="")
intensity_outer = param.Number(default=0, bounds=(0, 1), step=0.01, doc="")
origin = param.Selector(default="mean", objects=['mean', 'corner', 'center'], doc="")
def get_stimulus_params(self):
return {
"visual_size": (self.height, self.width),
"ppd": self.ppd,
"frequency": self.frequency,
"order": self.order,
"intensities": (self.intensity_center, self.intensity_outer),
"origin": self.origin,
}
from stimupy.components.waves import bessel
from stimupy._docs.display_stimulus import InteractiveStimDisplay
# Create and display the interactive bessel
bessel_params = BesselParams()
disp = InteractiveStimDisplay(bessel, bessel_params)
disp.layout