Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
patrchristen opened this issue Sep 10, 2024 · 2 comments
Labels
upstream Needs changes in an upstream library not developed by EnMAP-Box team (like Qt, Proj, GDAL, ...)

Comments

@patrchristen
Copy link

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

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
Copy link
Author

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
Copy link
Contributor

@steffi1296 can you please have a look at this.

@janzandr janzandr added the upstream Needs changes in an upstream library not developed by EnMAP-Box team (like Qt, Proj, GDAL, ...) label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Needs changes in an upstream library not developed by EnMAP-Box team (like Qt, Proj, GDAL, ...)
Projects
None yet
Development

No branches or pull requests

2 participants