ezmsg.simbiophys.dnss.spike#
Produce data mimicking Blackrock Neurotech’s Digital Neural Signal Simulator
Functions
- spike_event_generator(mode='hdmi', n_chans=4)[source]#
Generator yielding spike event indices for the DNSS pattern.
This is a send-able generator. After priming with next(), use send(n_samples) to get spikes for the next n_samples window. The generator maintains internal state tracking the current sample position.
- Parameters:
- Yields:
Tuple of (coords, waveform_ids) –
coords: Shape (2, n_spikes) array of [sample_indices, channel_indices]
waveform_ids: Waveform shape identifiers (1, 2, or 3)
- Return type:
Generator[tuple[ndarray[tuple[Any,...],dtype[int64]],ndarray[tuple[Any,...],dtype[int64]]],int,None]
Example
gen = spike_event_generator() next(gen) # Prime the generator coords, waveforms = gen.send(30000) # Get spikes in first 30000 samples coords, waveforms = gen.send(15000) # Get spikes in next 15000 samples
Classes
- class DNSSSpikeProducer(*args, **kwargs)[source]#
Bases:
BaseClockDrivenProducer[DNSSSpikeSettings,DNSSSpikeState]Produces DNSS spike signal synchronized to clock ticks.
Each clock tick produces a block of spike data as sparse COO arrays based on the sample rate (fs) and chunk size (n_time) settings.
- class DNSSSpikeSettings(fs=30000, n_time=None, n_ch=256, mode='hdmi')[source]#
Bases:
ClockDrivenSettingsSettings for DNSS spike producer.
- class DNSSSpikeUnit(*args, settings=None, **kwargs)[source]#
Bases:
BaseClockDrivenUnit[DNSSSpikeSettings,DNSSSpikeProducer]Unit for generating DNSS spikes from clock input.
- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
DNSSSpikeSettings
- spike_event_generator(mode='hdmi', n_chans=4)[source]#
Generator yielding spike event indices for the DNSS pattern.
This is a send-able generator. After priming with next(), use send(n_samples) to get spikes for the next n_samples window. The generator maintains internal state tracking the current sample position.
- Parameters:
- Yields:
Tuple of (coords, waveform_ids) –
coords: Shape (2, n_spikes) array of [sample_indices, channel_indices]
waveform_ids: Waveform shape identifiers (1, 2, or 3)
- Return type:
Generator[tuple[ndarray[tuple[Any,...],dtype[int64]],ndarray[tuple[Any,...],dtype[int64]]],int,None]
Example
gen = spike_event_generator() next(gen) # Prime the generator coords, waveforms = gen.send(30000) # Get spikes in first 30000 samples coords, waveforms = gen.send(15000) # Get spikes in next 15000 samples
- class DNSSSpikeSettings(fs=30000, n_time=None, n_ch=256, mode='hdmi')[source]#
Bases:
ClockDrivenSettingsSettings for DNSS spike producer.
- class DNSSSpikeProducer(*args, **kwargs)[source]#
Bases:
BaseClockDrivenProducer[DNSSSpikeSettings,DNSSSpikeState]Produces DNSS spike signal synchronized to clock ticks.
Each clock tick produces a block of spike data as sparse COO arrays based on the sample rate (fs) and chunk size (n_time) settings.
- class DNSSSpikeUnit(*args, settings=None, **kwargs)[source]#
Bases:
BaseClockDrivenUnit[DNSSSpikeSettings,DNSSSpikeProducer]Unit for generating DNSS spikes from clock input.
- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
DNSSSpikeSettings