prfmodel.models.prf.DelayedNormPRFModel

class prfmodel.models.prf.DelayedNormPRFModel(prf_model: prfmodel.models.base.BasePopulationResponse, encoding_model: prfmodel.models.base.BaseStimulusEncoder | type[prfmodel.models.base.BaseStimulusEncoder] = PRFStimulusEncoder, impulse_model: prfmodel.impulse.base.BaseImpulse | type[prfmodel.impulse.base.BaseImpulse] | None = DerivativeTwoGammaImpulse, scaling_model: prfmodel.scaling.base.BaseScaling | type[prfmodel.scaling.base.BaseScaling] | None = BaselineAmplitude, regressors_model: prfmodel.regressors.base.BaseRegressors | list[prfmodel.regressors.base.BaseRegressors] | None = None)

Delayed gain normalization population receptive field (pRF) model.

Combines a pRF response model, stimulus encoding, and an impulse response (h₁) with an inline delayed normalization stage (h₂ = exponential decay) to form a complete DGN model. The computation and all DGN-specific parameters (n, dispersion_normalization, sigma_saturation, amplitude, baseline) live in this class; pRF-specific parameters come from prf_model.

Parameters:
  • prf_model (BasePopulationResponse) – A population receptive field response model instance.

  • encoding_model (BaseStimulusEncoder or type, default=PRFStimulusEncoder) – An stimulus encoding model class or instance. Model classes will be instantiated during initialization. The default creates a PRFStimulusEncoder instance.

  • impulse_model (BaseImpulse or type or None, default=DerivativeTwoGammaImpulse, optional) – An impulse model class or instance. Model classes will be instantiated during initialization. The default creates a DerivativeTwoGammaImpulse instance with default values.

  • scaling_model (BaseScaling or type or None, default=BaselineAmplitude) – Scaling model applied to R(t) after the nonlinear stage. Model classes are instantiated during initialisation. Set to None to return R(t) unscaled.

  • regressors_model (BaseRegressors or list of BaseRegressors or RegressorsList or None, default=None, optional) – A regressor model instance, a list of regressor model instances, or None. When a list is provided, it is wrapped in a RegressorsList and its contributions are summed. The regressor contribution is added after the scaling model.

Notes

The delayed gain normalization model follows [1]:

  1. Linear — pRF response encoded with the stimulus design, then convolved with the impulse response h₁ to produce L(t).

  2. Normalization — L(t) is convolved with h₂ = exp(-t/τ₂) to produce g(t).

  3. NonlinearR(t) = |L(t)|ⁿ / (sigmaⁿ + |g(t)|ⁿ).

  4. Outputamplitude * R(t) + baseline.

Paper-recommended starting values (Fig. 2): n=2, dispersion_normalization=0.1, sigma_saturation=1, delay=0.05 (τ₁), weight_deriv=0.

References

__call__(stimulus: prfmodel.stimuli.PRFStimulus, parameters: pandas.DataFrame, regressors: pandas.DataFrame | None = None, dtype: str | None = None) prfmodel.typing.Tensor

Predict the delayed gain normalization model response.

Returns:

The predicted model response with shape (num_units, num_frames) and dtype dtype.

Return type:

Tensor

property parameter_names: list[str]

Names of parameters used by the model (pRF + h₁ impulse + DGN + scaling).