stimpyp.pyvstim.PyVProtocol#

class stimpyp.pyvstim.PyVProtocol#

Bases: AbstractStimProtocol

class for handle the protocol file for pyvstim version (vb lab legacy)

Dimension parameters:

N = number of visual stimulation (on-off pairs) = (T * S)

T = number of trials

S = number of Stim Type

C = number of Cycle

__init__(name, options, visual_stimuli, version)#
Parameters:
  • name (str)

  • options (dict[str, Any])

  • visual_stimuli (DataFrame)

  • version (Literal['pyvstim', 'stimpy-bit', 'stimpy-git', 'debug'])

Methods

__init__(name, options, visual_stimuli, version)

get_loops_expr()

parse and get the expression and loop number

load(file, *[, cast_numerical_opt])

Load *.prot file

Attributes

background

TODO

blank_duration

blank duration between each visual stimulus (in sec)

end_blank_duration

blank duration after the visual stimulation epoch

is_shuffle

TODO

n_stimuli

number of stimuli (S)

n_trials

(T,)

start_blank_duration

blank duration before starting the visual stimulation epoch (in sec)

stim_params

stimulus_type

stimulus type

total_duration

total protocol duration

trial_blank_duration

blank duration between trials (in sec) TODO check stimpy source code

trial_duration

trial duration

visual_duration

total visual duration

name

protocol name.

options

protocol options

visual_stimuli_dataframe

visual stimuli dataframe.

version

date of major changes

classmethod load(file, *, cast_numerical_opt=True)#

Load *.prot file

Parameters:

file (Path | str) – file path

Return type:

PyVProtocol

property is_shuffle: bool#

TODO

property background: float#

TODO

property start_blank_duration: int#

blank duration before starting the visual stimulation epoch (in sec)

property blank_duration: int#

blank duration between each visual stimulus (in sec)

property trial_blank_duration: int#

blank duration between trials (in sec) TODO check stimpy source code

property end_blank_duration: int#

blank duration after the visual stimulation epoch

property trial_duration: int#

trial duration

property visual_duration: int#

total visual duration

property total_duration: int#

total protocol duration

get_loops_expr()#

parse and get the expression and loop number

Return type:

ProtExpression

__init__(name, options, visual_stimuli, version)#
Parameters:
  • name (str)

  • options (dict[str, Any])

  • visual_stimuli (DataFrame)

  • version (Literal['pyvstim', 'stimpy-bit', 'stimpy-git', 'debug'])

property n_stimuli: int#

number of stimuli (S)

property n_trials: int#

(T,)

property stim_params: tuple[str, ...]#
property stimulus_type: str#

stimulus type

name: str#

protocol name. related to filename

options: dict[str, Any]#

protocol options

visual_stimuli_dataframe: pl.DataFrame#

visual stimuli dataframe. row number: S

version: STIMPY_SOURCE_VERSION#

date of major changes