aspen.stimuli.identity

Identity transformation to generate sounds signal itself

Classes

Identity([binaural])

Identity transformation to generate sounds signal itself.

class aspen.stimuli.identity.Identity(binaural=False)[source]

Bases: aspen.interfaces.abs_common_interface.AbsCommonInterface, aspen.interfaces.abs_stimulus_interface.AbsStimulusInterface

Identity transformation to generate sounds signal itself.

Parameters

binaural (bool) – The flag to consider inputs as binaural stimulus. 1st & 2nd inputs are left & right channels, respectively. Defaults to False.

__call__(x)[source]

Identity transformation to generate sounds signal itself.

Parameters

x (Sequence[ndarray]) – noise or tone generated by sounds module. x must be sequence-like object such as list, tuple and so on.

Return type

ndarray

Returns

Stimulus that is generated by sounds module.

static add_arguments(parser)[source]

add arguments

classmethod load_class_kwargs(args)

Return the kwargs dict for class __init__ from parsed arguments

Parameters

args (Namespace) – (config)argparse arguments

Return type

dict

Returns

kwargs for class __init__