aspen.stimuli.continuity¶
Continuity illusion stimulus
Classes
|
Stimulus that occurs continuity illusion. |
-
class
aspen.stimuli.continuity.
Continuity
(samp_freq=16000, target_duration=100, gap_duration=100, gap_method='replace', gap_ramp_duration=10, target_snr=20)[source]¶ Bases:
aspen.interfaces.abs_common_interface.AbsCommonInterface
,aspen.interfaces.abs_stimulus_interface.AbsStimulusInterface
Stimulus that occurs continuity illusion.
Basic stimulus for continuity illusion consists of the repetitions of target_signal and gap_signal.
- Parameters
target_duration¶ (
float
) – Duration of target signal in millisecond. Defaults to 100.gap_duration¶ (
float
) – Duration of gap signal in millisecond. Defaults to 100.gap_method¶ (
str
) – Kind of gap method. In the case of replace and silent, the gap sections are replaced by noise and silent, respectively. In the case of overlap, the target signal superimpose noise in the gap sections. Defaults to “replace”.gap_ramp_duration¶ (
float
) – Duration of ramps in the gap sections in millisecond. Defaults to 10.target_snr¶ (
float
) – Signal-to-noise ratio. Defaults to 20.
-
__call__
(x)[source]¶ Generate stimulus for continuity illusion.
- Parameters
x¶ (
Sequence
[ndarray
]) – Target signal (np.ndarray) and noise signal (np.ndarray). x must be sequence-like object such as list, tuple and so on. The first element is target signal and the second one is noise (i.e. [target, noise]). The duration of noise must be equal to or greater than the one of target signal. In the case of gap_method=silent, the second element is ignored.- Return type
- Returns
Stimulus for continuity illusion.