xdem.coreg.DirectionalBias#
- class xdem.coreg.DirectionalBias(angle=0, fit_or_bin='bin_and_fit', fit_func='nfreq_sumsin', fit_optimizer=<function curve_fit>, bin_sizes=10, bin_statistic=<function nanmedian>, bin_apply_method='linear')[source]#
Bias correction for directional biases, for example along- or across-track of satellite angle.
- __init__(angle=0, fit_or_bin='bin_and_fit', fit_func='nfreq_sumsin', fit_optimizer=<function curve_fit>, bin_sizes=10, bin_statistic=<function nanmedian>, bin_apply_method='linear')[source]#
Instantiate a directional bias correction.
- Parameters
angle (
float) – Angle in which to perform the directional correction (degrees).fit_or_bin (
Union[Literal['bin_and_fit'],Literal['fit'],Literal['bin']]) – Whether to fit or bin. Use “fit” to correct by optimizing a function or “bin” to correct with a statistic of central tendency in defined bins.fit_func (
Union[Callable[...,ndarray[Any,dtype[floating[Any]]]],Literal['norder_polynomial'],Literal['nfreq_sumsin']]) – Function to fit to the bias with variables later passed in .fit().fit_optimizer (
Callable[...,tuple[ndarray[Any,dtype[floating[Any]]],Any]]) – Optimizer to minimize the function.bin_sizes (
int|dict[str,Union[int,Iterable[float]]]) – Size (if integer) or edges (if iterable) for binning variables later passed in .fit().bin_statistic (
Callable[[ndarray[Any,dtype[floating[Any]]]],floating[Any]]) – Statistic of central tendency (e.g., mean) to apply during the binning.bin_apply_method (
Union[Literal['linear'],Literal['per_bin']]) – Method to correct with the binned statistics, either “linear” to interpolate linearly between bins, or “per_bin” to apply the statistic for each bin.
Methods
__init__([angle, fit_or_bin, fit_func, ...])Instantiate a directional bias correction.
apply(dem[, bias_vars, transform, crs, resample])Apply the estimated transform to a DEM.
apply_pts(coords)Apply the estimated transform to a set of 3D points.
copy()Return an identical copy of the class.
error(reference_dem, dem_to_be_aligned[, ...])Calculate the error of a coregistration approach.
fit(reference_dem, dem_to_be_aligned[, ...])Estimate the coregistration transform on the given DEMs.
fit_pts(reference_dem, dem_to_be_aligned[, ...])Estimate the coregistration transform between a DEM and a reference point elevation data.
residuals(reference_dem, dem_to_be_aligned)Calculate the residual offsets (the difference) between two DEMs after applying the transformation.