Open VISTA95 opened 11 months ago
The Agricultural Applications are maintained by @Maesiu (Matthias Wocher, m.wocher@iggf.geo.uni-muenchen.de).
Are you trying to extract the SRF from an existing .bsq image? To be able to help, I would need to know how the header-file (.hdr) looks like and if it contains all necessary information, most importantly FWHM and wavelength info.
Check the .hdr content below for reference:
ENVI description = { U:\EnVAL\Satellitendaten\EnMAP\MNI\ENMAP01-L2A-DT0000001966_20220728T105005Z_023_V010201_20230406T040124Z\20220728_104828_smooth_9_cut.bsq} samples = 354 lines = 230 bands = 190 header offset = 0 file type = ENVI Standard data type = 2 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 693794.021484523, 5351931.65438998, 30, 30, 32, North,WGS-84} coordinate system string = {PROJCS["WGS_1984_UTM_Zone_32N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]} band names = { Band 1, Band 2, Band 3, Band 4, Band 5, Band 6, Band 7, Band 8, Band 9, Band 10, Band 11, Band 12, Band 13, Band 14, Band 15, Band 16, Band 17, Band 18, Band 19, Band 20, Band 21, Band 22, Band 23, Band 24, Band 25, Band 26, Band 27, Band 28, Band 29, Band 30, Band 31, Band 32, Band 33, Band 34, Band 35, Band 36, Band 37, Band 38, Band 39, Band 40, Band 41, Band 42, Band 43, Band 44, Band 45, Band 46, Band 47, Band 48, Band 49, Band 50, Band 51, Band 52, Band 53, Band 54, Band 55, Band 56, Band 57, Band 58, Band 59, Band 60, Band 61, Band 62, Band 63, Band 64, Band 65, Band 66, Band 67, Band 68, Band 69, Band 70, Band 71, Band 72, Band 73, Band 74, Band 75, Band 76, Band 77, Band 78, Band 79, Band 80, Band 81, Band 82, Band 83, Band 84, Band 85, Band 86, Band 87, Band 88, Band 89, Band 90, Band 91, Band 92, Band 93, Band 94, Band 95, Band 96, Band 97, Band 98, Band 99, Band 100, Band 101, Band 102, Band 103, Band 104, Band 105, Band 106, Band 107, Band 108, Band 109, Band 110, Band 111, Band 112, Band 113, Band 114, Band 115, Band 116, Band 117, Band 118, Band 119, Band 120, Band 121, Band 122, Band 123, Band 124, Band 125, Band 126, Band 127, Band 128, Band 129, Band 130, Band 131, Band 132, Band 133, Band 134, Band 135, Band 136, Band 137, Band 138, Band 139, Band 140, Band 141, Band 142, Band 143, Band 144, Band 145, Band 146, Band 147, Band 148, Band 149, Band 150, Band 151, Band 152, Band 153, Band 154, Band 155, Band 156, Band 157, Band 158, Band 159, Band 160, Band 161, Band 162, Band 163, Band 164, Band 165, Band 166, Band 167, Band 168, Band 169, Band 170, Band 171, Band 172, Band 173, Band 174, Band 175, Band 176, Band 177, Band 178, Band 179, Band 180, Band 181, Band 182, Band 183, Band 184, Band 185, Band 186, Band 187, Band 188, Band 189, Band 190} data ignore value = -9999 fwhm = {6.99561, 6.6675, 6.42408, 6.25124, 6.13485, 6.06076, 6.01486, 5.98302, 5.95232, 5.9199, 5.88775, 5.8579, 5.83239, 5.81325, 5.8025, 5.8022, 5.81407, 5.83751, 5.87076, 5.91208, 5.95969, 6.01183, 6.06674, 6.12279, 6.1794, 6.23648, 6.29397, 6.35179, 6.40987, 6.46815, 6.52654, 6.58497, 6.64338, 6.70177, 6.76072, 6.82113, 6.88388, 6.94987, 7.01999, 7.09511, 7.17533, 7.25495, 7.33145, 7.40537, 7.47729, 7.54777, 7.61738, 7.68669, 7.75628, 7.8267, 7.89853, 7.97235, 8.04871, 8.1281, 8.2102, 8.29433, 8.3798, 8.46592, 8.552, 8.63735, 8.72128, 8.80311, 8.88214, 8.95779, 9.03034, 9.1005, 9.16897, 9.23646, 9.30368, 9.37133, 9.44012, 9.51076, 9.58396, 9.66032, 9.73971, 9.82161, 9.90551, 9.99089, 10.0772, 9.17725, 9.31901, 9.45441, 9.58399, 9.7083, 9.82789, 9.94331, 10.0551, 10.1638, 10.27, 10.3742, 10.4768, 10.5775, 10.6753, 10.769, 10.8578, 10.9405, 11.0162, 11.0839, 11.1437, 11.196, 11.2414, 11.2806, 11.3139, 11.3421, 11.3656, 11.385, 11.4009, 11.4135, 11.4229, 11.4292, 11.4325, 11.4329, 11.4305, 11.4253, 10.8577, 10.8161, 10.7738, 10.7308, 10.6872, 10.643, 10.5985, 10.5535, 10.5082, 10.4626, 10.4169, 10.371, 10.3251, 10.2793, 10.2335, 10.1879, 10.1425, 10.0974, 10.0525, 9.00775, 8.96875, 8.92995, 8.89134, 8.85292, 8.81469, 8.77665, 8.73878, 8.70111, 8.66361, 8.62632, 8.58923, 8.55236, 8.51572, 8.47932, 8.44317, 8.40728, 8.37166, 8.33632, 8.30128, 8.26653, 8.2321, 8.198, 8.16422, 8.13079, 8.09771, 8.065, 8.03267, 8.00072, 7.96916, 7.93802, 7.90728, 7.87694, 7.84695, 7.81727, 7.78785, 7.75866, 7.72966, 7.70079, 7.67203, 7.64333, 7.61464, 7.58593, 7.55715, 7.52827, 7.49924, 7.47001, 7.44055, 7.41082, 7.38077, 7.35037, 7.31957, 7.28832, 7.25659, 7.22434, 7.19152, 7.1581} wavelength = {418.24, 423.874, 429.294, 434.528, 439.603, 444.549, 449.391, 454.159, 458.884, 463.584, 468.265, 472.934, 477.599, 482.265, 486.941, 491.633, 496.349, 501.094, 505.87, 510.678, 515.519, 520.397, 525.313, 530.268, 535.265, 540.305, 545.391, 550.525, 555.71, 560.947, 566.239, 571.587, 576.995, 582.464, 587.997, 593.596, 599.267, 605.011, 610.833, 616.737, 622.732, 628.797, 634.919, 641.1, 647.341, 653.643, 660.007, 666.435, 672.927, 679.485, 686.11, 692.804, 699.567, 706.401, 713.307, 720.282, 727.324, 734.431, 741.601, 748.833, 756.124, 763.472, 770.876, 778.333, 785.843, 793.402, 801.01, 808.665, 816.367, 824.112, 831.901, 839.731, 847.601, 855.509, 863.455, 871.433, 879.442, 887.478, 895.537, 902.257, 911.872, 921.624, 931.512, 941.53, 951.677, 961.948, 972.341, 982.851, 993.475, 1004.21, 1015.05, 1026.0, 1037.05, 1048.19, 1059.42, 1070.74, 1082.14, 1093.62, 1105.17, 1116.79, 1128.47, 1140.2, 1151.98, 1163.81, 1175.67, 1187.56, 1199.48, 1211.42, 1223.37, 1235.34, 1247.31, 1259.3, 1271.29, 1283.29, 1530.64, 1542.02, 1553.36, 1564.65, 1575.9, 1587.1, 1598.26, 1609.36, 1620.43, 1631.44, 1642.41, 1653.33, 1664.2, 1675.03, 1685.8, 1696.53, 1707.2, 1717.83, 1728.4, 1977.37, 1986.74, 1996.07, 2005.36, 2014.61, 2023.82, 2032.99, 2042.11, 2051.19, 2060.24, 2069.24, 2078.21, 2087.13, 2096.01, 2104.86, 2113.67, 2122.44, 2131.17, 2139.87, 2148.52, 2157.15, 2165.73, 2174.28, 2182.79, 2191.27, 2199.71, 2208.12, 2216.5, 2224.84, 2233.14, 2241.42, 2249.66, 2257.86, 2266.04, 2274.18, 2282.29, 2290.37, 2298.42, 2306.44, 2314.42, 2322.37, 2330.29, 2338.19, 2346.05, 2353.88, 2361.68, 2369.45, 2377.19, 2384.9, 2392.58, 2400.23, 2407.85, 2415.45, 2423.01, 2430.55, 2438.05, 2445.53} wavelength units = Nanometers
I just tested the extraction and I cannot reproduce your error (although I admit that catching your error/problem surely is not working as intended) Please check your .bsq/.hdr.
ok. I was able to reproduce the error and it is connected with the QGIS update 28.13. We'll have a look into it.
Using the Create LUT Tool from the Agricultural Applications, a new sensor file (srf) cannot be created since a fielepath of a *.bsq file cannot correctly by set.
ERROR MESSAGE I: _Ein Fehler trat bei der Ausführung von Python-Code auf:
AttributeError: 'QHeaderView' object has no attribute 'setResizeMode' Traceback (most recent call last): File "C:\Users\Christoph\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1096, in self.gui.mLayer.layerChanged.connect(lambda: self.open_image(mode="imgDropdown")) File "C:\Users\Christoph\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1250, in open_image self.image_read() File "C:\Users\Christoph\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1294, in image_read self.gui.tablePreview.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) AttributeError: 'QHeaderView' object has no attribute 'setResizeMode'
Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS-Version: 3.28.8-Firenze Firenze, 5ac45272b5_
ERROR MESSAGE II: _Ein Fehler trat bei der Ausführung von Python-Code auf:
AttributeError: 'SensorEditor' object has no attribute 'x' Traceback (most recent call last): File "C:\Users\Christoph\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1095, in self.gui.cmdInputImage.clicked.connect(lambda: self.open_image(mode="imgSelect")) File "C:\Users\Christoph\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1261, in open_image self.check_flags() File "C:\Users\Christoph\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuvegetationapps\LUT\CreateLUT_GUI.py", line 1374, in check_flags text = "Create Generic SRF from Imagery OK: " + str(len(self.x[:, 0])) + " Bands." AttributeError: 'SensorEditor' object has no attribute 'x'
Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS-Version: 3.28.8-Firenze Firenze, 5ac45272b5_