Commit 93b9361d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added test of output writer and tie point grid visualization.

updated __version__ and __versionalias__
parent 911d341b
Pipeline #399 passed with stages
in 8 minutes and 9 seconds
......@@ -4,8 +4,8 @@
__author__ = """Daniel Scheffler"""
__email__ = 'daniel.scheffler@gfz-potsdam.de'
__version__ = '0.4.7'
__versionalias__ = '2017-07-07_08'
__version__ = '0.4.8'
__versionalias__ = '2017-07-07_09'
from .CoReg import COREG
......
......@@ -26,7 +26,7 @@ test_requirements = ['coverage']
setup(
name='arosics',
version='0.4.7',
version='0.4.8',
description="An Automated and Robust Open-Source Image Co-Registration Software for Multi-Sensor Satellite Data",
long_description=readme + '\n\n' + history,
author="Daniel Scheffler",
......
......@@ -14,12 +14,16 @@ test_cases = dict(
ref_path = os.path.join(tests_path, 'data/testcase_inter1_S2A_S2A/ref_S2A_20160608T153121_T33UUU_sub.jp2'),
tgt_path = os.path.join(tests_path, 'data/testcase_inter1_S2A_S2A/tgt_S2A_20160529T153631_T33UUU_sub.jp2'),
kwargs_global = dict(
path_out = os.path.join(tests_path, 'output/testcase_inter1_S2A_S2A/'
'tgt_S2A_20160529T153631_T33UUU_sub_CR_global.bsq'),
progress = False,
v = 0),
wp_inside = (344720, 5848485),# (344932, 5842974), # inside of overlap
wp_outside = (349533, 5818862), # outside of overlap
kwargs_local = dict(
grid_res = 100,
path_out=os.path.join(tests_path, 'output/testcase_inter1_S2A_S2A/'
'tgt_S2A_20160529T153631_T33UUU_sub_CR_local.bsq'),
progress = False)
)
)
......@@ -5,6 +5,8 @@
import unittest
import shutil
import os
# custom
from .cases import test_cases
......@@ -49,10 +51,12 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
self.ref_path = test_cases['INTER1']['ref_path']
self.tgt_path = test_cases['INTER1']['tgt_path']
self.coreg_kwargs = test_cases['INTER1']['kwargs_global']
self.coreg_kwargs['wp'] = test_cases['INTER1']['wp_inside']
def tearDown(self):
"""Tear down test fixtures, if any."""
"""Delete output."""
dir_out = os.path.dirname(self.coreg_kwargs['path_out'])
if os.path.isdir(dir_out):
shutil.rmtree(dir_out)
def test_calculation_of_tie_point_grid(self):
# get instance of COREG_LOCAL object
......@@ -64,4 +68,5 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
# test shift correction and output writer
CR.correct_shifts()
# TODO test writer (path_out is by now not passed)
self.assertTrue(os.path.exists(self.coreg_kwargs['path_out']),
'Output of global co-registration has not been written.')
......@@ -5,6 +5,8 @@
import unittest
import shutil
import os
# custom
from .cases import test_cases
......@@ -49,7 +51,10 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
self.coreg_kwargs = test_cases['INTER1']['kwargs_local']
def tearDown(self):
"""Tear down test fixtures, if any."""
"""Delete output."""
dir_out = os.path.dirname(self.coreg_kwargs['path_out'])
if os.path.isdir(dir_out):
shutil.rmtree(dir_out)
def test_calculation_of_tie_point_grid(self):
# get instance of COREG_LOCAL object
......@@ -59,7 +64,10 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
TPG = CRL.CoRegPoints_table
# test tie point grid visualization
#CRL.view_CoRegPoints() # only works if basemap is installed
CRL.view_CoRegPoints() # only works if basemap is installed
# test shift correction and output writer
CRL.correct_shifts()
self.assertTrue(os.path.exists(self.coreg_kwargs['path_out']),
'Output of local co-registration has not been written.')
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