EnMAP-Box / enmap-box

EnMAP-Box source code repository. See https://enmap-box.readthedocs.io for documentation
GNU General Public License v3.0
35 stars 16 forks source link

Decorrelation stretch rendering does not work #811

Closed aloboa closed 4 months ago

aloboa commented 5 months ago

Decorrelation stretch rendering does not change the display vs. a simple linear stretching, it does not perform any decorrelation.

version 3.13.1 Code 7a0aa3b3476

janzandr commented 4 months ago

Confirmed, I get the following error:

An error has occurred while executing Python code: 

sklearn.utils._param_validation.InvalidParameterError: The 'feature_range' parameter of MinMaxScaler must be an instance of 'tuple'. Got [0, 255] instead. 
Traceback (most recent call last):
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\coreapps\decorrelationstretchapp\decorrelationstretchdialog.py", line 182, in onLiveUpdate
    self.onApplyClicked()
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\coreapps\decorrelationstretchapp\decorrelationstretchdialog.py", line 174, in onApplyClicked
    renderer = self.currentRenderer()
  File "C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages\typeguard\__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\EnMAP-Box Develop\python\plugins\enmapboxplugin\enmapbox\coreapps\decorrelationstretchapp\decorrelationstretchdialog.py", line 126, in currentRenderer
    scaler2.fit(percentiles)
  File "C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages\sklearn\preprocessing\_data.py", line 450, in fit
    return self.partial_fit(X, y)
  File "C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages\sklearn\base.py", line 1344, in wrapper
    estimator._validate_params()
  File "C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages\sklearn\base.py", line 666, in _validate_params
    validate_parameter_constraints(
  File "C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages\sklearn\utils\_param_validation.py", line 95, in validate_parameter_constraints
    raise InvalidParameterError(
sklearn.utils._param_validation.InvalidParameterError: The 'feature_range' parameter of MinMaxScaler must be an instance of 'tuple'. Got [0, 255] instead.
janzandr commented 4 months ago

Already fixed in v3.14-alpha.0