Commit b0306dfb authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Enhanced documentation.

parent 1f46d7d9
Pipeline #3356 passed with stages
in 1 minute and 38 seconds
......@@ -496,22 +496,41 @@ def warp_ndarray(ndarray, in_gt, in_prj=None, out_prj=None, out_dtype=None,
class SensorMapGeometryTransformer(object):
def __init__(self, data, lons, lats, resamp_alg='nearest', **opts):
# type: (np.ndarray, np.ndarray, np.ndarray, str, dict) -> None
def __init__(self, data, lons, lats, resamp_alg='nearest', radius_of_influence=30, **opts):
# type: (np.ndarray, np.ndarray, np.ndarray, str, int, dict) -> None
"""Get an instance of SensorMapGeometryTransformer.
:param data: numpy array to be warped to sensor or map geometry
:param lons: longitude array
:param lats: latitude array
:param resamp_alg: resampling algorithm ('nearest', 'bilinear', 'gauss', 'custom')
:param opts: options to be passed as keyword arguments to the pyresample resampling function,
for documentation see here:
:Keyword Arguments: (further documentation here:
- resamp_alg: resampling algorithm ('nearest', 'bilinear', 'gauss', 'custom')
- radius_of_influence: <float> Cut off distance in meters (default: 30)
NOTE: keyword is named 'radius' in case of bilinear resampling
- sigmas: <list of floats or float> [ONLY 'gauss'] List of sigmas to use for the gauss
weighting of each channel 1 to k, w_k = exp(-dist^2/sigma_k^2). If only one channel
is resampled sigmas is a single float value.
- neighbours: <int> [ONLY 'bilinear', 'gauss'] Number of neighbours to consider for each grid
point when searching the closest corner points
- epsilon: <float> Allowed uncertainty in meters. Increasing uncertainty reduces execution time
- weight_funcs: <list of function objects or function object> [ONLY 'custom'] List of weight
functions f(dist) to use for the weighting of each channel 1 to k. If only one
channel is resampled weight_funcs is a single function object.
- fill_value: <int or None> Set undetermined pixels to this value.
If fill_value is None a masked array is returned with undetermined pixels masked
- reduce_data: <bool> Perform initial coarse reduction of source dataset in order to reduce
execution time
- nprocs: <int>, Number of processor cores to be used
- segments: <int or None> Number of segments to use when resampling.
If set to None an estimate will be calculated
- with_uncert: <bool> [ONLY 'gauss' and 'custom'] Calculate uncertainty estimates
NOTE: resampling function has 3 return values instead of 1: result, stddev, count
""" = data
self.resamp_alg = resamp_alg
self.opts = dict(radius_of_influence=30,
self.opts = dict(radius_of_influence=radius_of_influence,
sigmas=(radius_of_influence / 2))
self.area_definition = None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment