Commit 7dd501c7 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Revised DESHIFTER.__doc__. Added sphinx type hints.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 7c698628
Pipeline #4310 passed with stages
in 4 minutes and 55 seconds
......@@ -27,6 +27,7 @@ test_arosics:
- make nosetests
# create the docs
- pip install sphinx_rtd_theme # Read-the-docs theme for SPHINX documentation
- pip install sphinx-autodoc-typehints
- make docs
artifacts:
paths:
......
......@@ -49,71 +49,71 @@ class DESHIFTER(object):
r"""
Deshift an image array or one of its products by applying the coregistration info calculated by COREG class.
:arg im2shift (`str`, `GeoArray`):
:param (str, GeoArray) im2shift:
path of an image to be de-shifted or alternatively a GeoArray object
:arg coreg_results (`dict`):
:arg (dict) coreg_results :
the results of the co-registration as given by COREG.coreg_info or COREG_LOCAL.coreg_info
:key path_out (`str`):
/output/directory/filename for coregistered results
:key (int) path_out:
/output/directory/filename for coregistered results
:key fmt_out (`str`):
raster file format for output file. ignored if path_out is None. can be any GDAL
:key (str) fmt_out:
raster file format for output file. ignored if path_out is None. can be any GDAL
compatible raster file format (e.g. 'ENVI', 'GTIFF'; default: ENVI)
:key out_crea_options(``list``):
:key (list) out_crea_options:
GDAL creation options for the output image, e.g., ["QUALITY=20", "REVERSIBLE=YES", "WRITE_METADATA=YES"]
:key band2process (``int``):
:key (int) band2process:
The index of the band to be processed within the given array (starts with 1),
default = None (all bands are processed)
:key nodata(``int``, ``float``):
:key (int, float) nodata:
no data value of the image to be de-shifted
:key out_gsd (``float``):
output pixel size in units of the reference coordinate system (default = pixel size of the input array),
:key (float) out_gsd:
output pixel size in units of the reference coordinate system (default = pixel size of the input array),
given values are overridden by match_gsd=True
:key align_grids (``bool``):
:key (bool) align_grids:
True: align the input coordinate grid to the reference (does not affect the output pixel size as long as
input and output pixel sizes are compatible (5:30 or 10:30 but not 4:30), default = False
:key match_gsd (``bool``):
:key (bool) match_gsd:
True: match the input pixel size to the reference pixel size, default = False
:key target_xyGrid(``list``):
:key (list) target_xyGrid:
a list with an x-grid and a y-grid like [[15,45], [15,45]].
This overrides 'out_gsd', 'align_grids' and 'match_gsd'.
This overrides 'out_gsd', 'align_grids' and 'match_gsd'.
:key min_points_local_corr (``int``):
:key (int) min_points_local_corr:
number of valid tie points, below which a global shift correction is performed instead of a local
correction (global X/Y shift is then computed as the mean shift of the remaining points)
(default: 5 tie points)
:key resamp_alg(``str``)
:key (str) resamp_alg:
the resampling algorithm to be used if neccessary
(valid algorithms: nearest, bilinear, cubic, cubic_spline, lanczos, average, mode, max, min, med, q1, q3)
:key cliptoextent (``bool``):
:key (bool) cliptoextent:
True: clip the input image to its actual bounds while deleting possible no data areas outside of the actual
bounds, default = False
:key clipextent (``list``):
:key (list) clipextent:
xmin, ymin, xmax, ymax - if given the calculation of the actual bounds is skipped.
The given coordinates are automatically snapped to the output grid.
:key CPUs(``int``):
:key (int) CPUs:
number of CPUs to use (default: None, which means 'all CPUs available')
:key progress(``bool``):
:key (bool) progress:
show progress bars (default: True)
:key v(``bool``):
:key (bool) v:
verbose mode (default: False)
:key q(``bool``):
:key (bool) q:
quiet mode (default: False)
"""
......
......@@ -45,7 +45,8 @@ extensions = [
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'sphinx.ext.todo',
'sphinxarg.ext'
'sphinxarg.ext',
'sphinx_autodoc_typehints'
]
# Add any paths that contain templates here, relative to this directory.
......@@ -147,7 +148,8 @@ html_theme_options = {
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
'titles_only': False,
'set_type_checking_flag': True # option of sphinx_autodoc_typehints extension
}
# Add any paths that contain custom themes here, relative to this directory.
......
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