iblrig.base_tasks.OSCClient
- class iblrig.base_tasks.OSCClient[source]
Handles communication to Bonsai using a UDP Client OSC channels:
USED: /t -> (int) trial number current /p -> (int) position of stimulus init for current trial /h -> (float) phase of gabor for current trial /c -> (float) contrast of stimulus for current trial /f -> (float) frequency of gabor patch for current trial /a -> (float) angle of gabor patch for current trial /g -> (float) gain of RE to visual stim displacement /s -> (float) sigma of the 2D gaussian of gabor /e -> (int) events transitions USED BY SOFTCODE HANDLER FUNC /r -> (int) whether to reverse the side contingencies (0, 1)
- send2bonsai(**kwargs)[source]
:param see list of keys in OSC_PROTOCOL :example: client.send2bonsai(trial_num=6, sim_freq=50) :return:
- OSC_PROTOCOL = {'contrast': {'mess': '/c', 'type': <class 'float'>}, 'position': {'mess': '/p', 'type': <class 'int'>}, 'stim_angle': {'mess': '/a', 'type': <class 'float'>}, 'stim_freq': {'mess': '/f', 'type': <class 'float'>}, 'stim_gain': {'mess': '/g', 'type': <class 'float'>}, 'stim_phase': {'mess': '/h', 'type': <class 'float'>}, 'stim_sigma': {'mess': '/s', 'type': <class 'float'>}, 'trial_num': {'mess': '/t', 'type': <class 'int'>}}