spynnaker.pyNN.models.current_sources package¶
Module contents¶
- class spynnaker.pyNN.models.current_sources.ACSource(start=0.0, stop=0.0, amplitude=0.0, offset=0.0, frequency=0.0, phase=0.0)¶
Bases:
AbstractCurrentSource
AC current source (i.e. sine wave) turned on at “start” and off at “stop”, given (y-)offset, amplitude, frequency and phase.
- Parameters:
- get_sdram_usage_in_bytes() int [source]¶
The SDRAM usage in bytes of the current source.
- Return type:
- class spynnaker.pyNN.models.current_sources.AbstractCurrentSource¶
Bases:
object
A simplified version of the PyNN class, since in most cases we work out the actual offset value on the SpiNNaker machine itself based on the parameters during the run.
- property app_vertex: AbstractPopulationVertex | None¶
The application vertex associated with the current source.
- Return type:
- abstract get_sdram_usage_in_bytes() int [source]¶
The SDRAM usage in bytes of the current source.
- Return type:
- inject_into(cells: PopulationBase)[source]¶
Inject this source into the specified population cells.
- Parameters:
cells (PopulationBase) – The cells to inject the source into
- abstract property parameter_types: Mapping[str, DataType]¶
The parameter types for the current source.
- abstract property parameters: Mapping[str, int | float | Sequence[int] | Sequence[float]]¶
The parameters of the current source.
- property population: Population | None¶
The population associated with the current source.
- Return type:
- set_app_vertex(vertex: AbstractPopulationVertex)[source]¶
Set the application vertex associated with the current source.
- Parameters:
vertex (AbstractPopulationVertex) – The population vertex
- abstract set_parameters(**parameters: int | float | Sequence[int] | Sequence[float])[source]¶
Set the current source parameters.
- Parameters:
parameters – the parameters to set
- set_population(population: Population)[source]¶
Set the population associated with the current source.
- Parameters:
population (Population)
- class spynnaker.pyNN.models.current_sources.CurrentSourceIDs(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
Hashes of the current sources currently supported
- AC_SOURCE = 2¶
- DC_SOURCE = 1¶
- NOISY_CURRENT_SOURCE = 4¶
- NO_SOURCE = 0¶
- N_SOURCES = 4¶
- STEP_CURRENT_SOURCE = 3¶
- class spynnaker.pyNN.models.current_sources.DCSource(amplitude=0.0, start=0.0, stop=0.0)¶
Bases:
AbstractCurrentSource
Current source with amplitude turned on at “start” and off at “stop”.
- get_sdram_usage_in_bytes() int [source]¶
The SDRAM usage in bytes of the current source.
- Return type:
- class spynnaker.pyNN.models.current_sources.NoisyCurrentSource(mean=0.0, stdev=0.0, start=0.0, stop=0.0, dt=1.0, rng=None)¶
Bases:
AbstractCurrentSource
A noisy current source beginning at “start” and ending at “stop”, with noise simulated based on the given mean and standard deviation, and updating every dt (dt should default to the machine time step).
- get_sdram_usage_in_bytes() int [source]¶
The SDRAM usage in bytes of the current source.
- Return type:
- class spynnaker.pyNN.models.current_sources.StepCurrentSource(times: Sequence[int] = (), amplitudes: Sequence[float] = ())¶
Bases:
AbstractCurrentSource
Current source where the amplitude changes based on a time array.
- get_sdram_usage_in_bytes() int [source]¶
The SDRAM usage in bytes of the current source.
- Return type: