stimpyp.stimulus.FunctionPattern#

class stimpyp.stimulus.FunctionPattern#

Bases: AbstractStimulusPattern

“Function Stimulus Pattern

__init__(time, contrast, pos_xy, size_xy, *, duration=None)#
Parameters:
  • time (ndarray) – stim on-off in sec. Array[float, [N, 2]]

  • contrast (ndarray) – stimulus contrast. Array[float, N]

  • pos_xy (ndarray) – object center position XY. Array[float, [N, 2]]

  • size_xy (ndarray) – object size width and height. Array[float, [N, 2]]

  • duration (ndarray | None) – theoretical duration in prot file, not actual detected using diode. Array[float, N]

Methods

__init__(time, contrast, pos_xy, size_xy, *)

foreach_stimulus([name])

Generator for (index, stimulus_time, pos_xy, size_xy)

of(rig)

init from Baselog children class

Attributes

pos_xy

object center position XY.

size_xy

object size width and height.

time

stim on-off in sec.

contrast

stimulus contrast.

duration

theoretical duration in prot file, not actual detected using diode.

classmethod of(rig)#

init from Baselog children class

Parameters:

rig (R) – AbstractLog

Returns:

StimPattern

Return type:

Self

time: ndarray#

stim on-off in sec. Array[float, [N, 2]]

contrast: ndarray#

stimulus contrast. Array[float, N]

duration: ndarray#

theoretical duration in prot file, not actual detected using diode. Array[float, N]

__init__(time, contrast, pos_xy, size_xy, *, duration=None)#
Parameters:
  • time (ndarray) – stim on-off in sec. Array[float, [N, 2]]

  • contrast (ndarray) – stimulus contrast. Array[float, N]

  • pos_xy (ndarray) – object center position XY. Array[float, [N, 2]]

  • size_xy (ndarray) – object size width and height. Array[float, [N, 2]]

  • duration (ndarray | None) – theoretical duration in prot file, not actual detected using diode. Array[float, N]

pos_xy: ndarray#

object center position XY. Array[float, [N, 2]]

size_xy: ndarray#

object size width and height. Array[float, [N, 2]]

foreach_stimulus(name=False)#

Generator for (index, stimulus_time, pos_xy, size_xy)

Parameters:

name (bool) – If True, return FunctionStim, otherwise, return tuple

Returns:

Return type:

Iterable[tuple[int, ndarray, ndarray, ndarray] | FunctionStim]