world_stimulation

Overview

Members

class world_stimulation.ObjectDistanceParams(world_size: int, amplitudes: List[float] | float = [], phases: List[float] | float = [], pulses_per_train: List[int] | int = [], num_trains: List[int] | int = [], pulse_intervals: List[float] | float = [], pulse_train_intervals: List[float] | float = [])

Bases: object

Stores parameters for stimuli delivered to an embodied culture in a 1D world.

Parameters:
  • world_size (int) – The maximum distance observable by the culture in a 1D world.

  • amplitudes (List[float] | float, optional) – A list of amplitudes of stim pulses for each unit away an object of interest is, in mV. If a float is passed, the same amplitude is used for all distances. defaults to []

  • phases (List[float] | float, optional) – A list of phases of stim pulses for each unit away an object of interest is, in us. If a float is passed, the same phase is used for all distances. defaults to []

  • pulses_per_train (List[int] | int, optional) – A list of pulses per train of stimuli for each unit away an object of interest is. If an int is passed, the same number of pulses per train is used for all distances. defaults to []

  • num_trains (List[int] | int, optional) – A list of numbers of trains of stimuli for each unit away an object of interest is. If an int is passed, the same number of number of trains is used for all distances. defaults to []

  • pulse_intervals (List[float] | float, optional) – A list of pulse intervals for each stimuli for each unit away an object of interest is. If a float is passed, the same pulse interval is used for all distances. defaults to []

  • pulse_train_intervals (List[float] | float, optional) – A list of pulse train intervals for each stimuli for each unit away an object of interest is. If a float is passed, the same pulse train interval is used for all distances. defaults to []

world_stimulation.build_distance_stimuli(world: str, object_distance_params: Dict[str, ObjectDistanceParams], maxtwo: bool = False, well: int = 0) List[ArbitraryStimulation]

Function to create Sequences for every single position in the world. Stores sequences with tokens of the form f”loc{i}_distance”.

Parameters:
  • world (str) – A string representing the 1D world.

  • object_distance_params (dict) – A dictionary of ObjectDistanceParams, each indexed by its corresponding “location of interest” in the world.

  • maxtwo (bool, optional) – Whether or not the code is being run on the MaxTwo, defaults to False

  • well (int, optional) – The well number. Defaults to 0.

Returns:

list of Stimulation sequences, indexed by the location in the world.

Return type:

List[ArbitraryStimulation]