xradarsat2.load_digital_number

xradarsat2.load_digital_number(dt, resolution=None, chunks={'line': 5000, 'sample': 5000}, resampling=Resampling.rms)

Add to the initial datatree (that contains all datasets) a new dataset with digital numbers (name of the dataset = digital_numbers)

Parameters
  • dt (datatree.Datatree) – datatree containing every dataset

  • resolution (str, dict[str, int], None or number) – Resampling dict like {‘line’: 20, ‘sample’: 20} where 20 is in pixels. if a number, dict will be constructed from {‘line’: number, ‘sample’: number} if str, it must end with ‘m’ (meters), like ‘100m’. dict will be computed from sensor pixel size

  • chunks (dict[str, int]) – dict with keys [‘pol’,’line’,’sample’] (dask chunks)

  • resampling (rasterio.enums.Resampling) – Only used if resolution is not None. ` rasterio.enums.Resampling.rms` by default. rasterio.enums.Resampling.nearest (decimation) is fastest

Returns

Initial datatree + dataset (possibly dual-pol), with basic coords/dims naming convention

Return type

datatree.Datatree