Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
arosics
Commits
feb75808
Commit
feb75808
authored
Aug 09, 2018
by
Daniel Scheffler
Browse files
Merge branch 'master' into bugfix/fix_missing_requirements
parents
5946f3e0
23cd8ab3
Pipeline
#3081
failed with stages
in 3 minutes and 23 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
arosics/CoReg.py
View file @
feb75808
...
...
@@ -133,7 +133,7 @@ class COREG(object):
- if None (default), the method correct_shifts() does not write to disk
- if 'auto': /dir/of/im1/<im1>__shifted_to__<im0>.bsq
:param fmt_out(str): raster file format for output file. ignored if path_out is None. can be any GDAL
compatible raster file format (e.g. 'ENVI', 'G
eo
TIFF'; default: ENVI). Refer to
compatible raster file format (e.g. 'ENVI', 'GTIFF'; default: ENVI). Refer to
http://www.gdal.org/formats_list.html to get a full list of supported formats.
:param out_crea_options(list): GDAL creation options for the output image,
e.g. ["QUALITY=80", "REVERSIBLE=YES", "WRITE_METADATA=YES"]
...
...
arosics/CoReg_local.py
View file @
feb75808
...
...
@@ -59,7 +59,7 @@ class COREG_LOCAL(object):
- if None (default), no output is written to disk
- if 'auto': /dir/of/im1/<im1>__shifted_to__<im0>.bsq
:param fmt_out(str): raster file format for output file. ignored if path_out is None. Can be any GDAL
compatible raster file format (e.g. 'ENVI', 'G
eo
TIFF'; default: ENVI). Refer to
compatible raster file format (e.g. 'ENVI', 'GTIFF'; default: ENVI). Refer to
http://www.gdal.org/formats_list.html to get a full list of supported formats.
:param out_crea_options(list): GDAL creation options for the output image,
e.g. ["QUALITY=80", "REVERSIBLE=YES", "WRITE_METADATA=YES"]
...
...
arosics/DeShifter.py
View file @
feb75808
...
...
@@ -34,7 +34,7 @@ class DESHIFTER(object):
:Keyword Arguments:
- path_out(str): /output/directory/filename for coregistered results
- fmt_out (str): raster file format for output file. ignored if path_out is None. can be any GDAL
compatible raster file format (e.g. 'ENVI', 'G
eo
TIFF'; default: ENVI)
compatible raster file format (e.g. 'ENVI', 'GTIFF'; default: ENVI)
- out_crea_options(list): GDAL creation options for the output image,
e.g. ["QUALITY=20", "REVERSIBLE=YES", "WRITE_METADATA=YES"]
- band2process (int): The index of the band to be processed within the given array (starts with 1),
...
...
@@ -382,7 +382,7 @@ def deshift_image_using_coreg_info(im2shift, coreg_results, path_out=None, fmt_o
:param path_out: /output/directory/filename for coregistered results. If None, no output is written - only
the shift corrected results are returned.
:param 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', 'G
eo
TIFF'; default: ENVI)
compatible raster file format (e.g. 'ENVI', 'GTIFF'; default: ENVI)
:param q: quiet mode (default: False)
:return:
"""
...
...
arosics/Tie_Point_Grid.py
View file @
feb75808
...
...
@@ -368,8 +368,8 @@ class Tie_Point_Grid(object):
bar
.
print_progress
((
i
+
1
)
/
len
(
GDF
)
*
100
)
results
[
i
,
:]
=
self
.
_get_spatial_shifts
(
coreg_kwargs
)
# merge results with GDF
records
=
GeoDataFrame
(
np
.
array
(
results
,
np
.
object
)
,
# merge results with GDF
records
=
GeoDataFrame
(
results
,
columns
=
[
'POINT_ID'
,
'X_WIN_SIZE'
,
'Y_WIN_SIZE'
,
'X_SHIFT_PX'
,
'Y_SHIFT_PX'
,
'X_SHIFT_M'
,
'Y_SHIFT_M'
,
'ABS_SHIFT'
,
'ANGLE'
,
'SSIM_BEFORE'
,
'SSIM_AFTER'
,
'SSIM_IMPROVED'
,
'RELIABILITY'
,
'LAST_ERR'
])
...
...
arosics/__init__.py
View file @
feb75808
...
...
@@ -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.
4
'
__versionalias__
=
'2018-0
3-08
_01'
__version__
=
'0.8.
6
'
__versionalias__
=
'2018-0
7-20
_01'
__all__
=
[
'COREG'
,
'COREG_LOCAL'
,
'DESHIFTER'
,
...
...
bin/arosics_cli.py
View file @
feb75808
...
...
@@ -63,9 +63,9 @@ def run_local_coreg(args):
min_reliability
=
args
.
min_reliability
,
rs_max_outlier
=
args
.
rs_max_outlier
,
rs_tolerance
=
args
.
rs_tolerance
,
# align_grids
=
args.align_grids,
# match_gsd
=
args.match_gsd,
# out_gsd
=
args.out_gsd,
# align_grids
=
args.align_grids,
# match_gsd
=
args.match_gsd,
# out_gsd
=
args.out_gsd,
resamp_alg_calc
=
args
.
rsp_alg_deshift
,
resamp_alg_deshift
=
args
.
rsp_alg_calc
,
data_corners_ref
=
args
.
cor0
,
...
...
@@ -147,7 +147,7 @@ def get_arosics_argparser():
gop_p
(
'-fmt_out'
,
nargs
=
'?'
,
type
=
str
,
default
=
'ENVI'
,
help
=
"raster file format for output file. ignored if path_out is None. can "
"be any GDAL compatible raster file format (e.g. 'ENVI', 'G
eo
TIFF'; default: ENVI)"
)
"be any GDAL compatible raster file format (e.g. 'ENVI', 'GTIFF'; default: ENVI)"
)
gop_p
(
'-br'
,
nargs
=
'?'
,
type
=
int
,
default
=
1
,
help
=
'band of reference image to be used for matching (starts with 1; default: 1)'
)
...
...
@@ -195,7 +195,7 @@ def get_arosics_argparser():
gop_p
(
'-mask_ref'
,
nargs
=
'?'
,
type
=
str
,
metavar
=
'file path'
,
default
=
None
,
help
=
"path to a 2D boolean mask file for the reference image where all bad data pixels (e.g. clouds) are "
"marked with True or 1 and the remaining pixels with False or 0. Must have the same geographic extent "
"and projection like the refernce image. The mask is used to check if the chosen matching window "
"and projection like the refer
e
nce image. The mask is used to check if the chosen matching window "
"position is valid in the sense of useful data. Otherwise this window position is rejected."
)
gop_p
(
'-mask_tgt'
,
nargs
=
'?'
,
type
=
str
,
metavar
=
'file path'
,
default
=
None
,
...
...
setup.py
View file @
feb75808
...
...
@@ -28,7 +28,7 @@ test_requirements = requirements + ['coverage', 'nose', 'nose-htmloutput', 'redn
setup
(
name
=
'arosics'
,
version
=
'0.8.
4
'
,
version
=
'0.8.
6
'
,
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"
,
...
...
tests/CI_docker/build_arosics_testsuite_image.sh
View file @
feb75808
...
...
@@ -2,7 +2,7 @@
context_dir
=
"./context"
dockerfile
=
"arosics_ci.docker"
tag
=
"arosics_ci:0.
6.10
"
tag
=
"arosics_ci:0.
8.6
"
gitlab_runner
=
"arosics_gitlab_CI_runner"
echo
"#### Build runner docker image"
...
...
tests/CI_docker/context/arosics_ci.docker
View file @
feb75808
FROM
gms_base_centos:
pinned_v0.1
FROM
gms_base_centos:
latest
# copy some needed stuff to /root
COPY
*.yml /root/
...
...
tests/test_COREG.py
View file @
feb75808
...
...
@@ -175,7 +175,7 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
# @unittest.SkipTest
def
test_plotting_after_shift_calculation
(
self
):
# , mock_show):
""""""
"""
Test plotting functionality.
"""
# mock_show.return_value = None # probably not necessary here in your case
CR
=
self
.
run_shift_detection_correction
(
self
.
ref_path
,
self
.
tgt_path
,
**
self
.
coreg_kwargs
)
self
.
assertTrue
(
CR
.
success
)
...
...
@@ -183,10 +183,12 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
# test all the visualization functions
CR
.
show_cross_power_spectrum
()
CR
.
show_cross_power_spectrum
(
interactive
=
True
)
CR
.
show_matchWin
(
interactive
=
False
)
CR
.
show_matchWin
(
interactive
=
False
,
after_correction
=
None
)
CR
.
show_matchWin
(
interactive
=
False
,
after_correction
=
True
)
# CR.show_matchWin(interactive=True) # only works if test is started with ipython
# CR.show_matchWin(interactive=False, deshifted=True)
CR
.
show_matchWin
(
interactive
=
False
,
after_correction
=
False
)
CR
.
show_matchWin
(
interactive
=
True
,
after_correction
=
None
)
# only works if test is started with ipython
CR
.
show_matchWin
(
interactive
=
True
,
after_correction
=
True
)
CR
.
show_matchWin
(
interactive
=
True
,
after_correction
=
False
)
CR
.
show_image_footprints
()
# if __name__ == '__main__':
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment