dreye.calculate_capture#
- dreye.calculate_capture(filters, signals, domain=1.0, trapz=True)[source]#
Calculate the stimulus-induced capture.
- Parameters:
- filtersndarray of shape (…, n_filters, n_domain)
Filter functions for each receptor type.
- signalsndarray of shape (…, n_signals, n_domain)
The signals exciting all receptor types.
- domainfloat or ndarray of shape (n_domain), optional
If float, it is assumed to be the step size in the domain (e.g. dx=1nm for wavelengths). If array-like, it is assumed to be an ascending array where each element is the value in domain coordinates (e.g. [340, 350, …, 670, 680]nm for wavelengths). By default 1.0.
- trapzbool, optional
Whether to use the trapezoidal method to calculate the integral or simply use the sum. If domain is array-like, this argument is ignored and the trapezoidal method is always used. By default True.
- Returns:
- capturesndarray of shape (…, n_signals, n_filters)
Calculated capture values.