Commit b1de8503 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Improved parameter titles and fixed that Polymer root directory was not optional.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 244ce694
Pipeline #24484 failed with stage
in 1 minute and 19 seconds
...@@ -300,10 +300,10 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm): ...@@ -300,10 +300,10 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_mode_ac, name=self.P_mode_ac,
description="Atmospheric correction mode", description="Atmospheric correction mode",
options=['land - SICOR (developed for land surfaces) is applied to land AND water surfaces', options=['land - SICOR (developed for land surfaces) is applied to land AND water surfaces',
'water - POLYMER (developed for water surfaces) is applied to water only; ' 'water - POLYMER (developed for water surfaces) is applied to water only; \n'
'land surfaces are not included in the L2A product', 'land surfaces are not included in the L2A product',
'combined - SICOR is applied to land and POLYMER is applied to water surfaces; ' 'combined - SICOR is applied to land and POLYMER is applied to water surfaces; \n'
'NOTE that this may result in edge effects, e.g., at coastlines*/'], 'NOTE that this may result in edge effects, e.g., at coastlines'],
defaultValue=2)) defaultValue=2))
self.addParameter( self.addParameter(
...@@ -311,13 +311,14 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm): ...@@ -311,13 +311,14 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_polymer_root, name=self.P_polymer_root,
description='Polymer root directory (that contains the subdirectory for ancillary data)', description='Polymer root directory (that contains the subdirectory for ancillary data)',
behavior=QgsProcessingParameterFile.Folder, behavior=QgsProcessingParameterFile.Folder,
defaultValue=self._get_default_polymer_root()), defaultValue=self._get_default_polymer_root(),
optional=True),
advanced=True) advanced=True)
self.addParameter( self.addParameter(
QgsProcessingParameterNumber( QgsProcessingParameterNumber(
name=self.P_threads, name=self.P_threads,
description='Number of threads for multiprocessing' description='Number of threads for multiprocessing when running ACwater/Polymer \n'
"('0: no threads', '-1: automatic', '>0: number of threads')", "('0: no threads', '-1: automatic', '>0: number of threads')",
type=QgsProcessingParameterNumber.Integer, type=QgsProcessingParameterNumber.Integer,
defaultValue=-1), defaultValue=-1),
...@@ -326,7 +327,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm): ...@@ -326,7 +327,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
self.addParameter( self.addParameter(
QgsProcessingParameterNumber( QgsProcessingParameterNumber(
name=self.P_blocksize, name=self.P_blocksize,
description='Block size for multiprocessing', description='Block size for multiprocessing when running ACwater/Polymer',
type=QgsProcessingParameterNumber.Integer, type=QgsProcessingParameterNumber.Integer,
defaultValue=100), defaultValue=100),
advanced=True) advanced=True)
...@@ -334,7 +335,8 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm): ...@@ -334,7 +335,8 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
self.addParameter( self.addParameter(
QgsProcessingParameterBoolean( QgsProcessingParameterBoolean(
name=self.P_auto_download_ecmwf, name=self.P_auto_download_ecmwf,
description='Automatically download ECMWF data for atmospheric correction', description='Automatically download ECMWF data for atmospheric correction '
'of water surfaces in ACwater/Polymer',
defaultValue=False), defaultValue=False),
advanced=True) advanced=True)
......
...@@ -88,9 +88,6 @@ class EnPTAlgorithm(_EnPTBaseAlgorithm): ...@@ -88,9 +88,6 @@ class EnPTAlgorithm(_EnPTBaseAlgorithm):
]: ]:
parameters[n] = opts[parameters[n]] parameters[n] = opts[parameters[n]]
feedback.pushInfo("The log messages of the EnMAP processing tool are written to the *.log file "
"in the specified output folder.")
# remove all parameters not to be forwarded to the EnPT CLI # remove all parameters not to be forwarded to the EnPT CLI
parameters = {k: v for k, v in parameters.items() parameters = {k: v for k, v in parameters.items()
if k not in ['anaconda_root'] if k not in ['anaconda_root']
......
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