Commit c304df93 authored by Greifeneder Felix's avatar Greifeneder Felix

Fixed and issue with the path definition for the SVR model

parent 2b1e7e16
......@@ -24,7 +24,7 @@ wheels/
.installed.cfg
*.egg
MANIFEST
MANIFEST.in
# PyInstaller
# Usually these files are written by a python script from a template
......
This diff is collapsed.
......@@ -61,6 +61,9 @@ Install PYSMM by running:
or
``git clone https://gitlab.inf.unibz.it/Felix.Greifeneder/pysmm``
``python setup.py install``
......
......@@ -594,7 +594,7 @@ class GEE_pt(object):
s1_ts = self.S1TS
# load SVR model
modelpath = os.path.join(os.getcwd(), 'pysmm', 'SVRmodel.p')
modelpath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'SVRmodel.p')
MLmodel = pickle.load(open(modelpath, 'rb'))
# extract land cover
......@@ -1153,9 +1153,8 @@ class GEE_extent(object):
self.S1_LIA = s1_lia
def estimate_SM(self):
# load SVR model
modelpath = os.path.join(os.getcwd(), 'S1SM', 'SVRmodel.p')
modelpath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'SVRmodel.p')
MLmodel_tuple = pickle.load(open(modelpath, 'rb'))
MLmodel1 = {'SVRmodel': MLmodel_tuple[0], 'scaler': MLmodel_tuple[1]}
MLmodel2 = {'SVRmodel': MLmodel_tuple[2], 'scaler': MLmodel_tuple[3]}
......@@ -1344,13 +1343,9 @@ class GEE_extent(object):
self.ESTIMATED_SM = estimated_smc
def get_S1_dates(self, tracknr=None, dualpol=True):
ee.Initialize()
# load S1 data
gee_s1_collection = ee.ImageCollection('COPERNICUS/S1_GRD')
# ASCENDING acquisitions
gee_s1_filtered = gee_s1_collection.filter(ee.Filter.eq('instrumentMode', 'IW')) \
.filterBounds(self.roi) \
......
from setuptools import setup
setup(name='pysmm',
version='0.3',
version='0.4',
description='Python Sentinel Soil-Moisture Mapping',
long_description='For detailed documentation go-to http://pysmm.readthedocs.io/en/latest/',
classifiers=[
......@@ -20,7 +20,7 @@ setup(name='pysmm',
'numpy',
'pandas',
'pytesmo',
'scikit-learn',
'scikit-learn==0.19.0',
'scipy'],
python_requires='>=2.6',
include_package_data=True,
......
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