Commit 6716aeb4 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Revised previous commit.

Updated version info.
parent 95516841
......@@ -435,9 +435,14 @@ class COREG(object):
# TODO: replace that function with geoArr.get_subset(zslice=slice(band4match, band4match+1))
# TODO: as soon as all metadata are passed through get_subset()
zslice = slice(geoArr_cr.band4match, geoArr_cr.band4match+1)
geoArr_cr.bandnames = list(np.array(list(geoArr_cr._bandnames))[zslice])
geoArr_cr.metadata = None if geoArr_cr._metadata is None else \
geoArr_cr._metadata[list(np.array(range(geoArr_cr.bands))[zslice])].copy()
if geoArr_cr._bandnames:
geoArr_cr.bandnames = list(np.array(list(geoArr_cr._bandnames))[zslice])
if geoArr_cr._metadata is not None:
geoArr_cr.metadata = \
geoArr_cr._metadata[list(np.array(range(len(geoArr_cr._metadata.columns)))[zslice])].copy()
return geoArr_cr
if self.grid2use == 'ref':
......
......@@ -12,8 +12,8 @@ from arosics.Tie_Point_Grid import Tie_Point_Grid
__author__ = """Daniel Scheffler"""
__email__ = 'daniel.scheffler@gfz-potsdam.de'
__version__ = '0.8.3'
__versionalias__ = '2018-03-07_01'
__version__ = '0.8.4'
__versionalias__ = '2018-03-08_01'
__all__ = ['COREG',
'COREG_LOCAL',
'DESHIFTER',
......
......@@ -28,7 +28,7 @@ test_requirements = requirements + ['coverage', 'nose', 'nose-htmloutput', 'redn
setup(
name='arosics',
version='0.8.3',
version='0.8.4',
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",
......
......@@ -86,3 +86,39 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
#
# # Part 2: Saving the results of each testsuite and the query for the job.status in individual variables.
# testResult = unittest.TextTestRunner(verbosity=2).run(alltests)
class TestBandnames(unittest.TestCase):
def setUp(self):
import dill
with open('/home/gfz-fe/scheffler/temp/coreg_bug_bandnames/CRL_argskwargs.dill', 'rb') as inF:
argskwargs = dill.load(inF)
argskwargs['im_ref'] = '/home/gfz-fe/scheffler/temp/coreg_bug_bandnames/ref_image.tif'
argskwargs['im_tgt'] = '/home/gfz-fe/scheffler/temp/coreg_bug_bandnames/L2A_T32UPV_20170430T103021_B05_20m.jp2'
argskwargs['q'] = False
self.argskwargs = argskwargs
def test(self):
crl = COREG_LOCAL(**self.argskwargs)
crl.tiepoint_grid
crl.correct_shifts()
# class TestBandnames(unittest.TestCase):
# def setUp(self):
# import dill
# with open('/home/gfz-fe/scheffler/temp/coreg_bug_bandnames/CRL_argskwargs_60m.dill', 'rb') as inF:
# argskwargs = dill.load(inF)
#
# argskwargs['im_ref'] = '/home/gfz-fe/scheffler/temp/coreg_bug_bandnames/ref_image.tif'
# argskwargs['im_tgt'] = '/home/gfz-fe/scheffler/temp/coreg_bug_bandnames/L2A_T32UPV_20170430T103021_B01_60m.jp2'
# argskwargs['q'] = False
#
# self.argskwargs = argskwargs
#
# def test(self):
# crl = COREG_LOCAL(**self.argskwargs)
# crl.tiepoint_grid
# crl.correct_shifts()
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