biphasic_stimulus_CM

class nrv.optim.optim_utils.biphasic_stimulus_CM(stim_ID: int = 0, start: float = 1, s_cathod: float | str = 100, t_cathod: float | str = 0.06, t_inter: float | str = 0.04, s_anod: float | str = None, s_ratio: float | str = 0.2, stim_gen: callable = None, stim_gen_kwargs: dict = {}, extracel_context: bool = True, intracel_context: bool = False, rec_context: bool = False)[source]

Context modifier which generate a stimulus biphasic stimulus from the input tuning parameters.

Parameters:
  • stim_ID (int, optional) – ID of the electrode which should be adapted, by default 0

  • start (float or str) – starting time of the waveform, in ms

  • s_cathod (float or str) – cathodic (negative stimulation value) current, in uA

  • s_anod (float or str) – anodic (positive stimulation value) current and, in uA

  • t_inter (float or str) – inter pulse timing, in ms

  • s_ratio (float or str) – if s_cathod set to None, s_cathod is set as: \(s_{anod}*s_{ratio}\). by default 0.2

  • stim_gen (callable, optional) – function use to generate the stimulus from the interpolated values, by default None

  • stim_gen_kwargs (dict, optional) – key arguments used for the , by default {}

  • extracel_context (bool) – specifies whether to load extracel_context with the static context

  • intracel_context (bool) – specifies whether to load intracel_context with the static context

  • rec_context (bool) – specifies whether to load rec_context with the static context

Warning

s_cathod must always positive, the user give here the absolute value

Note

Note that start, s_cathod, s_anod and t_inter are the paramters used to generate a harmonic_pulse() stimulus. They can either be:
  • set as float, to a constant value (wich will not be changed by the )

  • set as str (“1”, “2”, ..) of the index of the value in the input vector.

See also

tutorials 5: First optimization problem using NRV

Methods

biphasic_stimulus_CM.__init__([stim_ID, ...])

Init method for NRV_class

biphasic_stimulus_CM.get_parameters()

Generic method returning all the atributes of an NRV_class instance

biphasic_stimulus_CM.interpolate(X)

interpolate the input vector with the interpolator.

biphasic_stimulus_CM.load(data[, blacklist])

Generic loading method for NRV_class instance

biphasic_stimulus_CM.save([save, fname, ...])

Generic saving method for NRV_class instance.

biphasic_stimulus_CM.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

biphasic_stimulus_CM.stimulus_generator(X_interp)

generated from interpolated values with stim_gen function.