psytask - v1.1.1
    Preparing search index...

    Function GaussianMask

    • Creates a Gaussian mask function for use with grating stimuli

      Parameters

      • sigma: number

        Standard deviation of the Gaussian function (controls spread)

      Returns MaskFunction

      A mask function that takes normalized coordinates and returns opacity

      // Create a soft-edged circular mask
      const softMask = GaussianMask(0.3);

      using gratingScene = app.scene(Grating, {
      defaultProps: {
      type: 'sin',
      size: [200, 200],
      sf: 0.05,
      mask: softMask,
      },
      });
      await gratingScene.show();