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

Deprecated the '' argument parser call and added a new entrypoint called 'arosics'.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <>
parent e44812c8
......@@ -107,9 +107,9 @@ def run_local_coreg(args):
def get_arosics_argparser():
"""Return argument parser for program."""
"""Return argument parser for arosics console command."""
parser = argparse.ArgumentParser(
description='Perform automatic subpixel co-registration of two satellite image datasets based on an image '
'matching approach working in the frequency domain, combined with a multistage workflow for '
......@@ -257,7 +257,7 @@ def get_arosics_argparser():
'calculated at a specific (adjustable) image position. Correction performs a global shifting in '
'X- or Y direction.',
help="detect and correct global X/Y shifts (sub argument parser) - "
"use '>>> python /path/to/arosics/bin/ global -h' for documentation and usage hints")
"use 'arosics global -h' for documentation and usage hints")
gloArg = parse_coreg_global.add_argument
......@@ -293,7 +293,7 @@ def get_arosics_argparser():
'calculated shifts of each point in the grid as GCPs. Thus this class can be used to correct '
'for locally varying geometric distortions of the target image.',
help="detect and correct local shifts (sub argument parser)"
"use '>>> python /path/to/arosics/bin/ local -h' for documentation and usage hints")
"use 'arosics local -h' for documentation and usage hints")
locArg = parse_coreg_local.add_argument
......@@ -330,7 +330,7 @@ def get_arosics_argparser():
return parser
if __name__ == '__main__':
def main():
from socket import gethostname
from datetime import datetime as dt
from getpass import getuser
......@@ -362,6 +362,10 @@ if __name__ == '__main__':
print('\ntotal processing time: %.2fs' % (time.time() - t0))
warnings.warn("The script '' provides a command line argument parser for AROSICS and is not to be "
"used as a normal Python module.")
if __name__ == "__main__":
if '' in sys.argv[0]:
warnings.warn("Starting the AROSICS command line argument parser with ' ...' is deprecated and "
"will be removed in future releases. Use 'arosics ...' instead.", DeprecationWarning)
sys.exit(main()) # pragma: no cover
Command line interface reference
At the command line, arosics provides the **** command:
At the command line, arosics provides the **arosics** command:
.. argparse::
:filename: ./../bin/
:func: get_arosics_argparser
:prog: arosics
.. note::
......@@ -202,11 +202,11 @@ The help instructions of the console interface can be accessed like this:
.. code-block:: bash
$ python -h
$ arosics -h
Follow these instructions to run AROSICS from a shell console. For example, the most simple call for a global
co-registration would look like this:
.. code-block:: bash
$ python global /path/to/your/ref_image.bsq /path/to/your/tgt_image.bsq
$ arosics global /path/to/your/ref_image.bsq /path/to/your/tgt_image.bsq
......@@ -178,4 +178,4 @@ co-registration would look like this:
.. code-block:: bash
$ python local /path/to/your/ref_image.bsq /path/to/your/tgt_image.bsq 50
$ arosics local /path/to/your/ref_image.bsq /path/to/your/tgt_image.bsq 50
......@@ -88,6 +88,11 @@ setup(
'Programming Language :: Python :: 3.9',
description="An Automated and Robust Open-Source Image Co-Registration Software for Multi-Sensor Satellite Data",
'console_scripts': [
"interactive_plotting": req_intplot,
"doc": req_doc,
......@@ -102,7 +107,7 @@ setup(
long_description=readme + '\n\n' + history,
scripts=["bin/"], # TODO Deprecated in 1.4.1. Remove in future.
tests_require=req + req_test,
Supports Markdown
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