Calculate a multidimensional maximum filter.
This is a wrapper around
scipy.ndimage.maximum_filter()
. See there for full
argument description. There are two key differences:
This wrapper uses explicit dimension labels in the
size
,
footprint
, and
origin
arguments. For example, instead of
size=[4,
6]
use
size={'time':4,
'space':6}
(with appropriate dimension labels for the data).
Coordinate values can be used (and should be preferred) for
size
and
origin
. For example, instead of
size=[4,
6]
use
size={'time':sc.scalar(5.0,
unit='ms'),
'space':sc.scalar(1.2,
unit='mm')}
.
In this case it is required that the corresponding coordinates exist and form a
“linspace”, i.e., are evenly spaced.
Warning
When
size
is an integer or a mapping to integers or when
footprint
is
given, coordinate values are ignored. That is, the filter is applied even if the
data points are not evenly spaced. The resulting filtered data may thus have no
meaningful interpretation.