Commit 1c7d217f authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Merge branch 'master' into tests

parents fc7834ea b7cf57ef
......@@ -15,7 +15,6 @@ except ImportError:
import numpy as np
from matplotlib import pyplot as plt
from geopandas import GeoDataFrame, GeoSeries
from pykrige.ok import OrdinaryKriging
from shapely.geometry import Point
from skimage.measure import points_in_poly, ransac
from skimage.transform import AffineTransform, PolynomialTransform
......@@ -683,6 +682,7 @@ class Tie_Point_Grid(object):
# Reference: P.K. Kitanidis, Introduction to Geostatistcs: Applications in Hydrogeology,
# (Cambridge University Press, 1997) 272 p.
from pykrige.ok import OrdinaryKriging
OK = OrdinaryKriging(X_coords, Y_coords, ABS_SHIFT, variogram_model='spherical',verbose=False)
zvalues, sigmasq = OK.execute('grid', grid_x, grid_y)#,backend='C',)
......@@ -751,6 +751,7 @@ class Tie_Point_Grid(object):
# Reference: P.K. Kitanidis, Introduction to Geostatistcs: Applications in Hydrogeology,
# (Cambridge University Press, 1997) 272 p.
from pykrige.ok import OrdinaryKriging
OK = OrdinaryKriging(X_coords, Y_coords, ABS_SHIFT, variogram_model='spherical',verbose=False)
zvalues, sigmasq = OK.execute('grid', grid_x, grid_y,backend='C',n_closest_points=12)
......
......@@ -4,8 +4,8 @@
__author__ = """Daniel Scheffler"""
__email__ = 'daniel.scheffler@gfz-potsdam.de'
__version__ = '0.4.15'
__versionalias__ = '2017-07-20_02'
__version__ = '0.4.17'
__versionalias__ = '2017-08-18_01'
import warnings
......@@ -19,6 +19,7 @@ from arosics.Tie_Point_Grid import Tie_Point_Grid
try:
import pyfftw
except ImportError:
pyfftw = None
warnings.warn('PYFFTW library is missing. However, coregistration works. But in some cases it can be much slower.')
del warnings, pyfftw
......@@ -6,6 +6,7 @@ __author__ = "Daniel Scheffler"
import time
import sys
import warnings
import argparse
from arosics import COREG, COREG_LOCAL, __version__
......@@ -82,15 +83,8 @@ def run_local_coreg(args):
CRL.correct_shifts()
if __name__ == '__main__':
import argparse
from socket import gethostname
from datetime import datetime as dt
from getpass import getuser
from arosics.io import wfa
wfa('/misc/hy5/scheffler/tmp/crlf', '%s\t%s\t%s\t%s\n' % (dt.now(), getuser(), gethostname(), ' '.join(sys.argv)))
def get_arosics_argparser():
"""Return argument parser for arosics_cli.py program."""
parser = argparse.ArgumentParser(
prog='arosics_cli.py',
......@@ -359,9 +353,18 @@ if __name__ == '__main__':
parse_coreg_local.set_defaults(func=run_local_coreg)
return parser
parsed_args = parser.parse_args()
if __name__ == '__main__':
from socket import gethostname
from datetime import datetime as dt
from getpass import getuser
from arosics.io import wfa
wfa('/misc/hy5/scheffler/tmp/crlf', '%s\t%s\t%s\t%s\n' % (dt.now(), getuser(), gethostname(), ' '.join(sys.argv)))
parsed_args = get_arosics_argparser().parse_args()
print('======================================================================\n'
'# AROSICS v%s #'%__version__+'\n'
......
......@@ -40,7 +40,7 @@ import arosics
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.todo', 'sphinxarg.ext']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
......
......@@ -5,3 +5,17 @@ Usage
To use arosics in a project::
import arosics
Command line utilities
**********************
arosics_cli.py
-----------
At the command line, arosics provides the **arosics_cli.py** command:
.. argparse::
:filename: ./../bin/arosics_cli.py
:func: get_arosics_argparser
:prog: arosics_cli.py
......@@ -12,12 +12,12 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'spectral', 'pykrige','geoarray',
'py_tools_ds', 'plotly'
# 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \
# 'basemap', # conda install --yes -c conda-forge basemap; \
]
requirements = ['numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'spectral','geoarray',
'py_tools_ds', 'plotly'
# 'pykrige' # conda install --yes -c conda-forge pykrige
# 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \
# 'basemap', # conda install --yes -c conda-forge basemap; \
]
setup_requirements = [
# TODO(danschef): put setup requirements (distutils extensions, etc.) here
......@@ -27,7 +27,7 @@ test_requirements = ['coverage']
setup(
name='arosics',
version='0.4.15',
version='0.4.17',
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",
......@@ -70,5 +70,12 @@ except ImportError:
try:
from mpl_toolkits.basemap import Basemap
except ImportError:
warnings.warn('You need to install basemap manually (see www./matplotlib.org/basemap) if you want to plot maps. '
warnings.warn('You need to install basemap manually if you want to plot maps (see www./matplotlib.org/basemap). '
'It is not automatically installed.') # TODO
# check for pykrige
try:
import pykrige
except ImportError:
warnings.warn('You need to install pykrige manually if you want to interpolate tie point grids produced by AROSICS '
'(see https://github.com/bsmurphy/PyKrige). It is not automatically installed.') # TODO
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