satpy.resample.base module

Base resampling functionality.

satpy.resample.base._check_resampler_class(resampler_class, resampler)[source]
satpy.resample.base._get_fill_value(dataset)[source]

Get the fill value of the dataset, defaulting to np.nan.

satpy.resample.base._get_resampler_classes_from_module(import_path)[source]
satpy.resample.base._hash_dict(the_dict, the_hash=None)[source]

Calculate a hash for a dictionary.

satpy.resample.base._update_resampled_coords(old_data, new_data, new_area)[source]

Add coordinate information to newly resampled DataArray.

Parameters:
satpy.resample.base.get_all_resampler_classes()[source]

Get all available resampler classes.

satpy.resample.base.prepare_resampler(source_area, destination_area, resampler=None, **resample_kwargs)[source]

Instantiate and return a resampler.

satpy.resample.base.resample(source_area, data, destination_area, resampler=None, **kwargs)[source]

Do the resampling.

satpy.resample.base.resample_dataset(dataset, destination_area, **kwargs)[source]

Resample dataset and return the resampled version.

Parameters:
  • dataset (xarray.DataArray) – Data to be resampled.

  • destination_area – The destination onto which to project the data, either a full blown area definition or a string corresponding to the name of the area as defined in the area file.

  • **kwargs – The extra parameters to pass to the resampler objects.

Returns:

A resampled DataArray with updated .attrs["area"] field. The dtype of the array is preserved.