iblrig.hardware.Bpod

Inheritance diagram of Bpod

class iblrig.hardware.Bpod[source]
__init__(*args, skip_initialization=False, **kwargs)[source]
Parameters:

skip_initialization (bool)

static __new__(cls, *args, **kwargs)[source]
close()[source]
Return type:

None

define_harp_sounds_actions(module, go_tone_index=2, noise_index=3)[source]
Parameters:
  • module (BpodModule)

  • go_tone_index (int)

  • noise_index (int)

Return type:

None

define_rotary_encoder_actions(module=None)[source]
Parameters:

module (BpodModule | None)

Return type:

None

define_xonar_sounds_actions()[source]
flush()[source]

Flushes valve 1.

get_ambient_sensor_reading()[source]
get_module(module_name)[source]

Get module by name.

Parameters:

module_name (str) – Regular Expression for matching a module name

Returns:

First matching module or None

Return type:

BpodModule | None

Parameters:

module_name (str)

open_valve(open, valve_number=1)[source]
Parameters:
pulse_valve(open_time_s, valve='Valve1')[source]
Parameters:
pulse_valve_repeatedly(repetitions, open_time_s, close_time_s=0.2, valve='Valve1')[source]
Parameters:
Return type:

int

register_softcodes(softcode_dict)[source]

Register softcodes to be used in the state machine.

Parameters:

softcode_dict (dict[int, Callable]) – dictionary of int keys with callables as values

Parameters:

softcode_dict (dict[int, Callable])

Return type:

None

set_status_led(state)[source]
Parameters:

state (bool)

Return type:

bool

toggle_valve(duration=None)[source]

Flush valve 1 for specified duration.

Parameters:

duration (int, optional) – Duration of valve opening in seconds.

Parameters:

duration (int | None)

valve(valve_id, state)[source]
Parameters:
property ambient_module
can_control_led = True
property is_connected
property rotary_encoder
softcodes: dict[int, Callable] | None = None
property sound_card