safe_nanmedian_filter¶
- grizli.utils.safe_nanmedian_filter(data, filter_kwargs={}, filter_footprint=None, axis=1, clean=True, cval=0.0)[source]¶
Run nanmedian filter on
data
- Parameters
- dataarray-like
The 2D data to filter
- filter_kwargsdict
Arguments to
make_filter_footprint
to make a 1D filter- filter_footprintarray-like
Specify the filter explicitly. If 1D, then will apply the filter over
axis=1
(i.e.,x
) ofdata
- axis0 or 1
Axis over which to apply the filter (
axis=1
filters on rows)- clean, cvalbool, scalar
Replace
nan
in the output withcval
- Returns
- filter_dataarray-like
Filtered data
- filter_namestr
The type of filter that was applied:
nbutils.nanmedian
ifnanmedian
was imported successfully andmedian_filter
for the fallback toscip.ndimage.median_filter
otherwise.