satpy.resample.native module

Native resampler.

class satpy.resample.native.NativeResampler(source_geo_def, target_geo_def)[source]

Bases: BaseResampler

Expand or reduce input datasets to be the same shape.

If data is higher resolution (more pixels) than the destination area then data is averaged to match the destination resolution.

If data is lower resolution (less pixels) than the destination area then data is repeated to match the destination resolution.

This resampler does not perform any caching or masking due to the simplicity of the operations.

Initialize resampler with geolocation information.

Parameters:
classmethod _expand_reduce(d_arr, repeats)[source]

Expand reduce.

compute(data, expand=True, **kwargs)[source]

Resample data with NativeResampler.

resample(data, cache_dir=None, mask_area=False, **kwargs)[source]

Run NativeResampler.

satpy.resample.native._aggregate(d, y_size, x_size)[source]

Average every 4 elements (2x2) in a 2D array.

satpy.resample.native._check_chunking(new_chunks, dask_arr, dim_idx, agg_size)[source]
satpy.resample.native._ensure_dask_array(d_arr)[source]
satpy.resample.native._get_axes(data)[source]
satpy.resample.native._get_repeats(target_geo_def, data)[source]
satpy.resample.native._get_replicated_chunk_sizes(d_arr, repeats)[source]
satpy.resample.native._mean(data, y_size, x_size)[source]
satpy.resample.native._rechunk_if_nonfactor_chunks(dask_arr, y_size, x_size)[source]
satpy.resample.native._repeat_by_factor(data, block_info=None)[source]
satpy.resample.native._replicate(d_arr, repeats)[source]

Repeat data pixels by the per-axis factors specified.

satpy.resample.native.get_resampler_classes()[source]

Get classes based on native resampler.