xdem.coreg.VerticalShift#
- class xdem.coreg.VerticalShift(vshift_reduc_func=<function median>, subsample=1.0)[source]#
Vertical translation alignment.
Estimates the mean vertical offset between two elevation datasets based on a reductor function (median, mean, or any custom reductor function).
The estimated vertical shift is stored in the self.meta[“outputs”][“affine”] key “shift_z” (in unit of the elevation dataset inputs, typically meters).
- __init__(vshift_reduc_func=<function median>, subsample=1.0)[source]#
Instantiate a vertical shift alignment object.
- Parameters:
Methods
__init__
([vshift_reduc_func, subsample])Instantiate a vertical shift alignment object.
apply
(elev[, bias_vars, resample, ...])Apply the estimated transform to a DEM.
centroid
()Get the centroid of the coregistration, if defined.
copy
()Return an identical copy of the class.
error
(reference_elev, to_be_aligned_elev[, ...])Calculate the error of a coregistration approach.
fit
(reference_elev, to_be_aligned_elev[, ...])Estimate the coregistration transform on the given DEMs.
fit_and_apply
(reference_elev, to_be_aligned_elev)Estimate and apply the coregistration to a pair of elevation data.
from_matrix
(matrix)Instantiate a generic Coreg class from a transformation matrix.
from_rotations
([x_rot, y_rot, z_rot])Instantiate a generic Coreg class from a X/Y/Z rotation.
from_translations
([x_off, y_off, z_off])Instantiate a generic Coreg class from a X/Y/Z translation.
info
([as_str])Summarize information about this coregistration.
residuals
(reference_elev, to_be_aligned_elev)Calculate the residual offsets (the difference) between two DEMs after applying the transformation.
to_matrix
()Convert the transform to a 4x4 transformation matrix.
to_rotations
()Extract X/Y/Z euler rotations (extrinsic convention) from the affine transformation matrix.
to_translations
()Extract X/Y/Z translations from the affine transformation matrix.
Attributes
is_affine
Check if the transform be explained by a 3D affine transform.
is_translation
meta
Metadata dictionary of the coregistration.