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

Removed 'optional' flag for parameters that have valid defaults. Added parameter ranges.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent be458f09
......@@ -163,8 +163,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_CPUs,
description='Number of CPU cores to be used for processing',
type=QgsProcessingParameterNumber.Integer,
defaultValue=cpu_count(), minValue=0, maxValue=cpu_count(),
optional=True),
defaultValue=cpu_count(), minValue=0, maxValue=cpu_count()),
advanced=True)
self.addParameter(
......@@ -193,8 +192,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
description='Average elevation in meters above sea level \n'
'(may be provided if no DEM is available and ignored if DEM is given)',
type=QgsProcessingParameterNumber.Integer,
defaultValue=0,
optional=True),
defaultValue=0),
advanced=True)
self.addParameter(
......@@ -267,7 +265,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_scale_factor_toa_ref,
description='Scale factor to be applied to TOA reflectance result',
type=QgsProcessingParameterNumber.Integer,
defaultValue=10000),
defaultValue=10000, minValue=0),
advanced=True)
self.addParameter(
......@@ -300,7 +298,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_mode_ac,
description="Atmospheric correction mode",
options=['land - SICOR is applied to land AND water',
'water - POLYMER is applied to water only; land is cleared '
'water - POLYMER is applied to water only; land is cleared ',
'combined - SICOR is applied to land and POLYMER to water'],
defaultValue=2))
......@@ -319,7 +317,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
description='Number of threads for multiprocessing when running ACwater/Polymer \n'
"('0: no threads', '-1: automatic', '>0: number of threads')",
type=QgsProcessingParameterNumber.Integer,
defaultValue=-1),
defaultValue=-1, minValue=-1, maxValue=cpu_count()),
advanced=True)
self.addParameter(
......@@ -327,7 +325,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_blocksize,
description='Block size for multiprocessing when running ACwater/Polymer',
type=QgsProcessingParameterNumber.Integer,
defaultValue=100),
defaultValue=100, minValue=1),
advanced=True)
self.addParameter(
......@@ -343,7 +341,7 @@ class _EnPTBaseAlgorithm(QgsProcessingAlgorithm):
name=self.P_scale_factor_boa_ref,
description='Scale factor to be applied to BOA reflectance result',
type=QgsProcessingParameterNumber.Integer,
defaultValue=10000),
defaultValue=10000, minValue=0),
advanced=True)
self.addParameter(
......
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