gui#

perceptivo.types.gui.GUI_PARAM_KEY#

Possible keys for GUI parameters.

  • frequencies - a tuple of frequencies to test

  • amplitudes - a tuple of amplitudes to test

  • log_x - boolean indicating whether an x-axis should be log scaled (True) or linearly scaled

  • log_y - boolean indicating whether a y-axis should be log scaled (True) or linearly scaled

  • extra_amplitude - boolean indicating whether an additional, suprathreshold amplitude should be tested as a confirmation

  • amplitude_step - Step size of amplitudes to test in dB

alias of Literal[‘frequencies’, ‘amplitudes’, ‘log_x’, ‘log_y’, ‘extra_amplitude’, ‘amplitude_step’, ‘amplitude_range’, ‘max_amplitude’, ‘frequency_step’, ‘frequency_range’, ‘iti’, ‘iti_jitter’]

perceptivo.types.gui.GUI_WIDGET_TYPE#

Widget types that correspond to particular Qt Widgets

  • int, float - PySide.QtWidgets.QSpinBox and PySide.QtWidgets.QDoubleSpinBox

  • range - widgets.components.Range_Setter

  • tuple - PySide.QtWidgets.QLineEdit evaluated by ast.literal_eval

  • bool - PySide.QtWidgets.QCheckBox

alias of Literal[‘int’, ‘float’, ‘range’, ‘tuple’, ‘bool’]

class perceptivo.types.gui.GUI_Control(*, key: Literal['frequencies', 'amplitudes', 'log_x', 'log_y', 'extra_amplitude', 'amplitude_step', 'amplitude_range', 'max_amplitude', 'frequency_step', 'frequency_range', 'iti', 'iti_jitter'], value: Union[str, float, tuple])#

Bases: perceptivo.types.root.PerceptivoType

Container for GUI_Params in transit

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

key: Literal['frequencies', 'amplitudes', 'log_x', 'log_y', 'extra_amplitude', 'amplitude_step', 'amplitude_range', 'max_amplitude', 'frequency_step', 'frequency_range', 'iti', 'iti_jitter']#
value: Union[str, float, tuple]#
class perceptivo.types.gui.GUI_Range(*, min: float, max: float, n: int)#

Bases: perceptivo.types.root.PerceptivoType

Range for widgets.components.Range_Setter

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

min: float#
max: float#
n: int#
class perceptivo.types.gui.GUI_Param(*, key: Literal['frequencies', 'amplitudes', 'log_x', 'log_y', 'extra_amplitude', 'amplitude_step', 'amplitude_range', 'max_amplitude', 'frequency_step', 'frequency_range', 'iti', 'iti_jitter'], name: str, widget_type: Literal['int', 'float', 'range', 'tuple', 'bool'], default: Optional[Union[float, int, perceptivo.types.gui.GUI_Range, tuple]] = None, args: list = None, kwargs: dict = None)#

Bases: perceptivo.types.root.PerceptivoType

Parameterization for a GUI Parameter itself. ie. How a particular parameter should be represented.

Params:

key (GUI_PARAMS): the key used for the parameter name (str): A human readable name for the parameter widget_type (GUI_WIDGETS): A string that indicates the type of widget that should be used.

Different widget_type s may use different widgets, combinations of widgets, and validators, and are thus not strictly isomorphic to a single widget type.

default (any): the default value to be set, must correspond to widget type args (list): args to pass to the widget kwargs (dict): kwargs to pass to the widget

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

key: Literal['frequencies', 'amplitudes', 'log_x', 'log_y', 'extra_amplitude', 'amplitude_step', 'amplitude_range', 'max_amplitude', 'frequency_step', 'frequency_range', 'iti', 'iti_jitter']#
name: str#
widget_type: Literal['int', 'float', 'range', 'tuple', 'bool']#
default: Optional[Union[float, int, perceptivo.types.gui.GUI_Range, tuple]]#
args: list#
kwargs: dict#
class perceptivo.types.gui.Control_Panel_Params(*, amplitude_range: perceptivo.types.gui.GUI_Param = GUI_Param(key='amplitude_range', name='Amplitude Range (dBSPL)', widget_type='range', default=GUI_Range(min=0.0, max=80.0, n=8), args=[], kwargs={'limits': (0, 100)}), frequency_range: perceptivo.types.gui.GUI_Param = GUI_Param(key='frequency_range', name='Frequency Range (Hz)', widget_type='range', default=GUI_Range(min=0.0, max=8000.0, n=17), args=[], kwargs={'limits': (0, 20000)}), iti: perceptivo.types.gui.GUI_Param = GUI_Param(key='iti', name='Inter-Trial Interval (s)', widget_type='float', default=5.0, args=[], kwargs={}), iti_jitter: perceptivo.types.gui.GUI_Param = GUI_Param(key='iti_jitter', name='Inter-Trial Jitter (proportion of ITI)', widget_type='float', default=0.1, args=[], kwargs={}))#

Bases: perceptivo.types.root.PerceptivoType

Defaults and parameters for perceptivo.gui.widgets.Control_Panel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class perceptivo.types.gui.GUI_Params(*, control_panel: perceptivo.types.gui.Control_Panel_Params = Control_Panel_Params(amplitude_range=GUI_Param(key='amplitude_range', name='Amplitude Range (dBSPL)', widget_type='range', default=GUI_Range(min=0.0, max=80.0, n=8), args=[], kwargs={'limits': (0, 100)}), frequency_range=GUI_Param(key='frequency_range', name='Frequency Range (Hz)', widget_type='range', default=GUI_Range(min=0.0, max=8000.0, n=17), args=[], kwargs={'limits': (0, 20000)}), iti=GUI_Param(key='iti', name='Inter-Trial Interval (s)', widget_type='float', default=5.0, args=[], kwargs={}), iti_jitter=GUI_Param(key='iti_jitter', name='Inter-Trial Jitter (proportion of ITI)', widget_type='float', default=0.1, args=[], kwargs={})))#

Bases: perceptivo.types.root.PerceptivoType

Container for all parameters to be given to the GUI on init

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

control_panel: perceptivo.types.gui.Control_Panel_Params#