stimulus

class nrv.utils.stimulus(s_init=0)[source]

Stimulus class for NRV2, signals are defined as asynchronous signals, with s the values and t as occurence timings.

Methods

stimulus.__init__([s_init])

Instantiation of a stimulus object.

stimulus.append(s, t)

Append a sample to the signal, internal use only.

stimulus.biphasic_pulse(start, s_cathod, ...)

Create a biphasic pulse waveform

stimulus.concatenate(s, t[, t_shift])

Concatenate samples to a signal, internal use only.

stimulus.constant(value[, start])

Ceat a constant signal

stimulus.get_parameters()

Generic method returning all the atributes of an NRV_class instance

stimulus.harmonic_pulse(start, t_pulse, ...)

Create a pulse waveform based on N harmonic

stimulus.insert_samples(t)

Insert samples inside a signal and adapt values consequently

stimulus.integrate()

stimulus.len()

Returns the length of the signal

stimulus.load(data[, blacklist])

Generic loading method for NRV_class instance

stimulus.load_stimulus([data])

stimulus.plot(ax[, scatter])

Plot the stimulus

stimulus.pulse(start, value[, duration])

Create pulse shape signal samples

stimulus.ramp(slope, start, duration, dt[, ...])

Create a ramp waveform with slop value

stimulus.ramp_lim(tstart, tstop, ampstart, ...)

Create a ramp waveform with bounds values

stimulus.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

stimulus.save_stimulus([save, fname])

stimulus.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

stimulus.sinus(start, duration, amplitude, freq)

Create a sinusoidal waveform

stimulus.snap_time(dt_min)

stimulus.sort()

Sort the signal with increasing timings

stimulus.square(start, duration, freq, ...)

Create a repetitive (periodic) square waveform