snake.core.handlers.activations.activations#

Activation Handler.

Module Contents#

Classes#

ActivationMixin

Add activation inside the region of interest. for a single type of event.

BlockActivationHandler

Activation Handler with block design.

API#

class snake.core.handlers.activations.activations.ActivationMixin[source]#

Bases: snake._meta.LogMixin

Add activation inside the region of interest. for a single type of event.

Parameters:
  • event_condition – array-like of shape (3, n_events) yields description of events for this condition as a (onsets, durations, amplitudes) triplet

  • hrf_model – Choice for the HRF, FIR is not

  • oversampling – Oversampling factor to perform the convolution. Default=50.

  • min_onset – Minimal onset relative to frame_times[0] (in seconds) events that start before frame_times[0] + min_onset are not considered. Default=-24.

  • roi_threshold (float, default 0.0) – If greater than 0, the roi becomes a binary mask, with roi_threshold as separation.

See also

nilearn.compute_regressors

event_condition: pandas.DataFrame | numpy.ndarray = None#
duration: float = None#
offset: float = 0#
event_name: str = None#
roi_tissue_name: str = 'ROI'#
delta_r2s: float = 1000.0#
hrf_model: str = 'glover'#
oversampling: int = 10#
min_onset: float = None#
roi_threshold: float = 0.0#
base_tissue_name = 'gm'#
get_static(phantom: snake.core.phantom.Phantom, sim_config: snake.core.simulation.SimConfig) snake.core.phantom.Phantom[source]#

Get the static ROI.

get_dynamic(phantom: snake.core.phantom.Phantom, sim_conf: snake.core.simulation.SimConfig) snake.core.phantom.DynamicData[source]#

Get dynamic time series for adding Activations.

static apply_weights(phantom: snake.core.phantom.Phantom, data: numpy.typing.NDArray, time_idx: int) snake.core.phantom.Phantom[source]#

Apply weights to the ROI.

class snake.core.handlers.activations.activations.BlockActivationHandler[source]#

Bases: snake.core.handlers.activations.activations.ActivationMixin, snake.core.handlers.base.AbstractHandler

Activation Handler with block design.

Parameters:
  • block_on (float) – time the block activation is on.

  • block_off (float) – time the block activation is off

  • duration (float) – Total duration of the pattern in seconds

  • offset (float, default 0) – Start time of the pattern in seconds

  • roi_tissue_name (str, default "ROI") – Name of the ROI tissue

  • event_name (str, default "block_on") – Name of the event

  • delta_r2s (float, default 1000.0) – Delta R2s value

  • hrf_model (str, default "glover") – HRF model

  • oversampling (int, default 50) – Oversampling factor

  • min_onset (float, default -24.0) – Minimal onset

  • roi_threshold (float, default 0.0) – ROI threshold

Notes

See Also the GLM module of Nilearn.

__handler_name__ = 'activation-block'#
block_on: float = None#
block_off: float = None#
duration: float = None#
offset: float = 0#
roi_tissue_name: str = 'ROI'#
event_name: str = 'block_on'#
delta_r2s: float = 1000.0#
hrf_model: str = 'glover'#
oversampling: int = 50#
min_onset: float = None#
roi_threshold: float = 0.0#
__post_init__()[source]#