xdem.coreg.Coreg.residuals#
- Coreg.residuals(reference_elev, to_be_aligned_elev, inlier_mask=None, transform=None, crs=None, subsample=1.0, random_state=None)[source]#
Calculate the residual offsets (the difference) between two DEMs after applying the transformation.
- Parameters:
reference_elev (
ndarray
[Any
,dtype
[floating
[Any
]]]) – 2D array of elevation values acting reference.to_be_aligned_elev (
ndarray
[Any
,dtype
[floating
[Any
]]]) – 2D array of elevation values to be aligned.inlier_mask (
ndarray
[Any
,dtype
[bool_
]] |None
) – Optional. 2D boolean array of areas to include in the analysis (inliers=True).transform (
Affine
|None
) – Optional. Transform of the reference_dem. Mandatory in some cases.crs (
CRS
|None
) – Optional. CRS of the reference_dem. Mandatory in some cases.subsample (
float
|int
) – Subsample the input to increase performance. <1 is parsed as a fraction. >1 is a pixel count.random_state (
None
|RandomState
|Generator
|int
) – Random state or seed number to use for calculations (to fix random sampling during testing)
- Return type:
- Returns:
A 1D array of finite residuals.