rebin

rebin(ds, **kwargs)[source]

Rebin an n-dimensional image across any single (spatial or spectral) axis

Todo

Check for and apply all masks and regions

Accept arguments that control which DataArray is rebinned

Improve performance when framework client has processes=True

Note

The new Dataset generated by the current implementation of this function will lose its metadata attributes. See https://github.com/pydata/xarray/issues/3376

Parameters
  • ds (xarray.core.dataset.Dataset) – input Image

  • factor (int, optional) – scaling factor for binning, Default=1

  • axis (str, optional) – dataset dimension upon which to rebin, Default=’frequency’

  • **kwargs – Arbitrary keyword arguments

Returns

output Image

Return type

xarray.core.dataset.Dataset