satpy.resample.base module
Base resampling functionality.
- satpy.resample.base._get_fill_value(dataset)[source]
Get the fill value of the dataset, defaulting to np.nan.
- satpy.resample.base._update_resampled_coords(old_data, new_data, new_area)[source]
Add coordinate information to newly resampled DataArray.
- Parameters:
old_data (xarray.DataArray) – Old data before resampling.
new_data (xarray.DataArray) – New data after resampling.
new_area (pyresample.geometry.BaseDefinition) – Area definition for the newly resampled data.
- 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.