psi.controller package

Subpackages

Submodules

psi.controller.api module

psi.controller.channel module

psi.controller.engine module

psi.controller.experiment_action module

class psi.controller.experiment_action.EventLogger(parent=None, **kwargs)[source]

Bases: Declarative

Defines a command that is invoked whenever an event occurs

command

A value of type str.

By default, bytes will NOT be promoted to strings. Pass strict=False to the constructor to enable loose string checking.

class psi.controller.experiment_action.ExperimentAction(parent=None, **kwargs)[source]

Bases: ExperimentActionBase

command

Command to invoke

class psi.controller.experiment_action.ExperimentActionBase(parent=None, **kwargs)[source]

Bases: Declarative

delay

Should action be delayed? If nonzero, this may cause some timing issues. Use with caution.

dependencies

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

event

A value of type str.

By default, bytes will NOT be promoted to strings. Pass strict=False to the constructor to enable loose string checking.

invocations

Number of times the command was invoked

invoke(core, **kwargs)[source]
kwargs

Arguments to pass to command by keyword

match

A value which is callable.

weight

Defines order of invocation. Less than 100 invokes before default. Higher than 100 invokes after default. Note that if concurrent is True, then order of execution is not guaranteed.

class psi.controller.experiment_action.ExperimentCallback(parent=None, **kwargs)[source]

Bases: ExperimentActionBase

callback

Callback to invoke

class psi.controller.experiment_action.ExperimentEvent(parent=None, **kwargs)[source]

Bases: Declarative

associated_state

A value which allows objects of a given type or types.

Values will be tested using the PyObject_TypeCheck C API call. This call is equivalent to type(obj) in cls.mro(). It is less flexible but can be faster than Instance. Use Instance when allowing you need a tuple of types or (abstract) types relying on custom __isinstancecheck__ and Typed when the value type is explicit.

If optional is True, the value of a Typed may be set to None, otherwise None is not considered as a valid value.

name

Export the ‘name’ attribute as a declarative member.

class psi.controller.experiment_action.ExperimentState(parent=None, **kwargs)[source]

Bases: Declarative

Allows for indication of a state (e.g., experiment_active, iti_active). Automatically contributes the start/end events associataed with the state (e.g., experiment_start, experiment_end).

events = ['prepare', 'start', 'end']
name

Export the ‘name’ attribute as a declarative member.

psi.controller.experiment_action.eval_match(code, context, ignore_missing=False)[source]
psi.controller.experiment_action.simple_match(key, context, ignore_missing=False)[source]

psi.controller.input module

psi.controller.output module

psi.controller.plugin module

psi.controller.util module

psi.controller.util.acquire(engine, waveform, ao_channel_name, ai_channel_names, gain=0, vrms=1, repetitions=2, min_snr=None, max_thd=None, thd_harmonics=3, trim=0.01, iti=0.01, debug=False)[source]

Given a single output, measure response in multiple input channels.

Parameters:

TODO

Returns:

result – TODO

Return type:

array

Module contents