stimulus_CM
- class nrv.optim.optim_utils.stimulus_CM(stim_ID: int = 0, interpolator: callable = None, intrep_kwargs: dict = {}, stim_gen: callable = None, stim_gen_kwargs: dict = {}, extracel_context: bool = True, intracel_context: bool = False, rec_context: bool = False, **kwargs)[source]
Generic context modifier which generate a stimulus from the input tuning parameters.
Note
- When an instance of this class is called the three following steps are done:
The input vector is interpolated with the interpolator. If not set, the interpolated vector will be the equal to the input vector.
The stimulus is generated from interpolated values with stim_gen function. If not set, interpolated values are set for the stimulus amplitude at constant sample rate (from zero to an argument
t_sim
)The generated stimulus is added to an electrode of a static context.
- Parameters:
stim_ID (int, optional) – ID of the electrode which should be adapted, by default 0
interpolator (callable, optional) – if not None function use to interpolate the input vector, by default None
intrep_kwargs (dict, optional) – key arguments to use with the interpolator, by default {}
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
Methods
|
Init method for |
Generic method returning all the atributes of an NRV_class instance |
|
interpolate the input vector with the interpolator. |
|
|
Generic loading method for |
|
Generic saving method for |
|
Generic method to set any attribute of |
|
generated from interpolated values with stim_gen function. |