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

Revised arosics_cli.py. Fixed issue #14.

parent ac0841ef
Pipeline #1793 passed with stages
in 3 minutes and 3 seconds
...@@ -4,6 +4,7 @@ import os ...@@ -4,6 +4,7 @@ import os
import time import time
import warnings import warnings
from copy import copy from copy import copy
from typing import Iterable
# custom # custom
try: try:
...@@ -215,8 +216,8 @@ class COREG(object): ...@@ -215,8 +216,8 @@ class COREG(object):
if data_corners_tgt and not isinstance(data_corners_tgt[0], list): # group if not [[x,y],[x,y]..] if data_corners_tgt and not isinstance(data_corners_tgt[0], list): # group if not [[x,y],[x,y]..]
data_corners_tgt = [data_corners_tgt[i:i + 2] for i in range(0, len(data_corners_tgt), 2)] data_corners_tgt = [data_corners_tgt[i:i + 2] for i in range(0, len(data_corners_tgt), 2)]
if nodata: if nodata:
assert isinstance(nodata, tuple) and len(nodata) == 2, \ assert isinstance(nodata, Iterable) and len(nodata) == 2, \
"'nodata' must be a tuple with two values. Got %s with length %s." % (type(nodata), len(nodata)) "'nodata' must be an iterable with two values. Got %s with length %s." % (type(nodata), len(nodata))
for rspAlg in [resamp_alg_deshift, resamp_alg_calc]: for rspAlg in [resamp_alg_deshift, resamp_alg_calc]:
assert rspAlg in _dict_rspAlg_rsp_Int.keys(), "'%s' is not a supported resampling algorithm." % rspAlg assert rspAlg in _dict_rspAlg_rsp_Int.keys(), "'%s' is not a supported resampling algorithm." % rspAlg
if resamp_alg_calc in ['average', 5] and (v or not q): if resamp_alg_calc in ['average', 5] and (v or not q):
......
This diff is collapsed.
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