EnMAP-Box / enmap-box

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

Create LUT | Error message regarding ResizeMode in CreateLUT_GUI.py & suggestions for "create new sensor" description #971

Open patrchristen opened 1 month ago

patrchristen commented 1 month ago

Hi,

  1. When opening a csv file for the "create new sensor" application within the "create look-up-table", the following error-message is outputted:

Traceback (most recent call last): File "C:\Users\christen\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1095, in self.gui.cmdInputFile.clicked.connect(lambda: self.open_srf_file()) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\christen\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1151, in open_srf_file self.read_file() File "C:\Users\christen\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1223, in read_file self.gui.tablePreview.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'QHeaderView' object has no attribute 'setResizeMode'. Did you mean: 'ResizeMode'?

The read-in of the csv works fine after changing all setResizeMode to ResizeMode in CreateLUT_GUI.py

  1. At the same time, I also would like to suggest to adjust the description of the "create sensor from measured spectral response functions (SRF) for each band" part, concerning the input files, as the input should not be SRF-files but csv-files, that will be converted into SRF-files in accordance with class BuildTrueSRF in Spec2Sensor_core.py. To me, it would make sense to include in the description how the text files should be structured (see: "Each band of the target sensor has its own text file which needs to have two columns: wavelengths and weights. Additionally, the central wavelengths of the target sensors need to be known, as they cannot be extracted from the weights right away. It can be single column (wavelengths) or two columns (wavelengths & FWHM).").

It would also make sense, to include, what the structure of the text-files should look like (see: "The other class is designed to create these .srf-files from text-based information about weights and wavelengths in a certain structure which was introduced by Karl Segl for dealing with the EnMAP-end-to-end-simulator (EeteS).").

It could also be useful to include such information in the readthedocs, as the info is not included yet.

Best regards, Patrick

patrchristen commented 1 month ago

Also for the first part of the "create new sensor" application ("create sensor generically from center wavelength ... from ... imagery"), it would make a lot of sense to include a notification referring to the "save raster layer as" (saverasterlayerasalgorithm.py) application to produce the bsq-file.

janzandr commented 1 month ago

@steffi1296 can you please have a look at this.