Skip to contents

After resample_to_grid() samples that the source instrument did not cover end up as NA (rule = 1 in stats::approx). This helper turns that NA pattern into a 0/1 mask.

Usage

mask_from_coverage(M_resampled)

Arguments

M_resampled

Numeric matrix returned by resample_to_grid()

Value

Integer matrix of the same shape (1 = covered, 0 = missing/NA)