Commit 15045f22 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Updated installation instructions. PEP8 editing.

parent c7951f0c
Pipeline #1050 passed with stages
in 7 minutes and 44 seconds
......@@ -58,7 +58,7 @@ Using [conda](https://conda.io/docs/), the recommended approach is:
# create virtual environment for arosics, this is optional
conda create -y -q --name arosics python=3
source activate arosics
conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pyproj rasterio
conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pyproj rasterio fiona shapely
conda install -y -q -c conda-forge pyfftw basemap pykrige # these libraries are optional
```
......
......@@ -52,7 +52,7 @@ Using conda_, the recommended approach is:
# create virtual environment for arosics, this is optional
conda create -y -q --name arosics python=3
source activate arosics
conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pyproj rasterio
conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pyproj rasterio fiona shapely
conda install -y -q -c conda-forge pyfftw basemap pykrige # these libraries are optional
......
......@@ -371,8 +371,7 @@ class COREG_LOCAL(object):
# transform all points of quality grid to LonLat
outlierCols = [c for c in self.CoRegPoints_table.columns if 'OUTLIER' in c]
attr2include = ['geometry', attribute2plot] + outlierCols + ['X_SHIFT_M', 'Y_SHIFT_M']
GDF = self.CoRegPoints_table.loc\
[self.CoRegPoints_table.X_SHIFT_M != self.outFillVal, attr2include].copy() \
GDF = self.CoRegPoints_table.loc[self.CoRegPoints_table.X_SHIFT_M != self.outFillVal, attr2include].copy()\
if exclude_fillVals else self.CoRegPoints_table.loc[:, attr2include]
# get LonLat coordinates for all points
......@@ -407,9 +406,12 @@ class COREG_LOCAL(object):
GDF['plt_Y'] = list(GDF['plt_XY'].map(lambda XY: XY[1]))
if hide_filtered:
if self.tieP_filter_level > 0: GDF = GDF[GDF.L1_OUTLIER == False].copy()
if self.tieP_filter_level > 1: GDF = GDF[GDF.L2_OUTLIER == False].copy()
if self.tieP_filter_level > 2: GDF = GDF[GDF.L3_OUTLIER == False].copy()
if self.tieP_filter_level > 0:
GDF = GDF[GDF.L1_OUTLIER == False].copy()
if self.tieP_filter_level > 1:
GDF = GDF[GDF.L2_OUTLIER == False].copy()
if self.tieP_filter_level > 2:
GDF = GDF[GDF.L3_OUTLIER == False].copy()
else:
marker = 'o' if len(GDF) < 10000 else '.'
if self.tieP_filter_level > 0:
......
......@@ -80,7 +80,8 @@ class Tie_Point_Grid(object):
:param q(bool): quiet mode (default: False)
"""
if not isinstance(COREG_obj, COREG): raise ValueError("'COREG_obj' must be an instance of COREG class.")
if not isinstance(COREG_obj, COREG):
raise ValueError("'COREG_obj' must be an instance of COREG class.")
self.COREG_obj = COREG_obj
self.grid_res = grid_res
......@@ -627,8 +628,8 @@ class Tie_Point_Grid(object):
'md': outputs magnitude and direction
"""
assert mode in ['uv', 'md'], "'mode' must be either 'uv' (outputs X-/Y shifts) or 'md' (outputs magnitude and " \
"direction)'. Got %s." % mode
assert mode in ['uv', 'md'], "'mode' must be either 'uv' (outputs X-/Y shifts) or 'md' " \
"(outputs magnitude and direction)'. Got %s." % mode
attr_b1 = 'X_SHIFT_M' if mode == 'uv' else 'ABS_SHIFT'
attr_b2 = 'Y_SHIFT_M' if mode == 'uv' else 'ANGLE'
......@@ -896,7 +897,8 @@ class Tie_Point_Refiner(object):
for co, n in zip([src_coords, est_coords], ['src_coords', 'est_coords']):
assert co.ndim == 2 and co.shape[1] == 2, "'%s' must have shape [Nx2]. Got shape %s." % (n, co.shape)
if not 0 < self.rs_max_outlier_percentage < 100: raise ValueError
if not 0 < self.rs_max_outlier_percentage < 100:
raise ValueError
min_inlier_percentage = 100 - self.rs_max_outlier_percentage
class PolyTF_1(PolynomialTransform):
......@@ -966,7 +968,7 @@ class Tie_Point_Refiner(object):
outliers = inliers == False if inliers is not None and inliers.size else np.array([])
if inGDF.empty or outliers is None or (isinstance(outliers, list) and not outliers) or \
(isinstance(outliers, np.ndarray) and not outliers.size):
(isinstance(outliers, np.ndarray) and not outliers.size):
gs = GeoSeries([False] * len(self.GDF))
elif len(inGDF) < len(self.GDF):
inGDF['outliers'] = outliers
......
......@@ -14,7 +14,7 @@ Using conda_, the recommended approach is:
# create virtual environment for arosics, this is optional
conda create -y -q --name arosics python=3
source activate arosics
conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pyproj rasterio
conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pyproj rasterio fiona shapely
conda install -y -q -c conda-forge pyfftw basemap pykrige # these libraries are optional
......
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