Commit 0eb5cc5e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

.gitlab-ci.yml: Added auto-download for AC tables.

Former-commit-id: 8400a748
Former-commit-id: 8d7b76a3
parent 5ee5d936
......@@ -18,6 +18,7 @@ test_gms_preprocessing:
- rm -rf context/sicor
- git clone https://gitext.gfz-potsdam.de/EnMAP/sicor.git ./context/sicor
- cd ./context/sicor
- make download-tables
- python setup.py install
- cd ../../
# make tests
......
......@@ -759,8 +759,8 @@ class AtmCorr(object):
def _validate_snr_source(self):
"""Check if the given file path for the SNR model exists - if not, use a constant SNR of 500."""
if not os.path.isfile(self.options["uncertainties"]["snr_model"]):
warnings.warn('No valid SNR model found for %s %s. Using constant SNR to compute uncertainties of '
'atmospheric correction.' % (self.inObjs[0].satellite, self.inObjs[0].sensor))
self.logger.warning('No valid SNR model found for %s %s. Using constant SNR to compute uncertainties of '
'atmospheric correction.' % (self.inObjs[0].satellite, self.inObjs[0].sensor))
# self.options["uncertainties"]["snr_model"] = np.nan # causes the computed uncertainties to be np.nan
self.options["uncertainties"]["snr_model"] = 500 # use a constant SNR of 500 to compute uncertainties
......
......@@ -463,7 +463,7 @@ class DEM_Creator(object):
# Build GDAL VRT from pathes and create output DEM
if not os.path.exists(CFG.job.path_tempdir):
os.makedirs(CFG.job.path_tempdir)
os.makedirs(CFG.job.path_tempdir) # directory where tempfile is created must exist (CentOS)
with tempFile(dir=CFG.job.path_tempdir, prefix='GeoMultiSens_', suffix='_dem_merged.vrt') as tFm, \
tempFile(dir=CFG.job.path_tempdir, prefix='GeoMultiSens_', suffix='_dem_out.vrt') as tFo:
......
......@@ -336,8 +336,9 @@ def get_path_ac_options(GMS_identifier):
assert os.path.exists(path_ac)
except AssertionError:
# FIXME this is a temporary workaround for issue #6 of sicor
warnings.warn('Could not locate options file for atmopsheric correction within SICOR installation folder. '
'Using the one provided with gms_preprocessing (maybe outdated).')
GMS_identifier['logger'].warning(
'Could not locate options file for atmospheric correction within SICOR installation folder. '
'Using the one provided with gms_preprocessing (maybe outdated).')
from gms_preprocessing import __file__
path_ac = os.path.join(os.path.dirname(__file__), 'database', 'sicor_options', fName_optFile)
return path_ac
......
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