gsolve.core.xr_accessor.TCorrMethods.apply_mask

gsolve.core.xr_accessor.TCorrMethods.apply_mask#

TCorrMethods.apply_mask(mask, fill_value=0.0)[source]#

Mask calling DataArray and set masked elements to fill_value.

Primarily used to apply a radial or rectangular distance mask to a density grid before computing terrain corrections.

Parameters:
masknumpy.ndarray

A boolean array of the same shape as calling DataArray.

fill_valuefloat, default is 0.0

Set masked elements to this value.

Returns:
xr.DataArray

A copy of calling DataArray with masked elements set to fill_value.