homonim.RasterFuse.create_model_config

RasterFuse.create_model_config(mask_partial: bool = False, downsampling: Resampling = Resampling.average, upsampling: Resampling = Resampling.cubic_spline) Dict

Utility method to create a KernelModel configuration dictionary that can be passed to KernelModel.__init__() and homonim.RasterFuse.process(). Without arguments, the default configuration is returned.

Parameters:
  • r2_inpaint_thresh (float, optional) – R2 (coefficient of determination) threshold below which to in-paint kernel model parameters from surrounding areas. Applies to the gain_offset model only. For pixels where the model gives a poor approximation to the data (this can occur in areas where source and reference differ due to e.g. shadowing, land cover changes etc.), model offsets are interpolated from surrounding areas, and gains re-estimated. None turns off in-painting.

  • mask_partial (bool, optional) – Mask output pixels not produced by full kernel or source/reference image coverage. Useful for ensuring strict model validity, and reducing seam-lines between overlapping images.

  • downsampling (rasterio.enums.Resampling, optional) – Resampling method to use when downsampling. See the rasterio docs for available options.

  • upsampling (rasterio.enums.Resampling, optional) –

    Resampling method to use when upsampling. See the rasterio docs for available options.

Returns:

Configuration dictionary.

Return type:

dict