Re: [GRASS-dev] seg fault of i.atcorr on quickbird
Hey Markus, my attempts have been umsuccessful so far, but i cannot yet say if it is my fault or the module... i have not a good grasp on my dataset yet. will work on it this week end. cheers, yann On Dec 15, 2016 11:26 PM, "Markus Neteler" wrote: > Hi Yann, > > On Mon, Nov 28, 2016 at 7:34 PM, Markus Neteler wrote: > ... > > ... the first column got messed up in the reformatting > > of the CSV file. Fixed in SVN in r69943 (trunk), r69942 (7.2), r69941 > > (7.0). > ... > > I have updated the iwave.cpp code accordingly in all 7 branches and > trunk. > > > > Yann, others: Please test. > > Does i.atcorr now work ok with Quickbird? > > Markus > ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
Hi Yann, On Mon, Nov 28, 2016 at 7:34 PM, Markus Neteler wrote: ... > ... the first column got messed up in the reformatting > of the CSV file. Fixed in SVN in r69943 (trunk), r69942 (7.2), r69941 > (7.0). ... > I have updated the iwave.cpp code accordingly in all 7 branches and trunk. > > Yann, others: Please test. Does i.atcorr now work ok with Quickbird? Markus ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
On Mon, Nov 28, 2016 at 3:55 PM, Nikos Alexandris wrote: ... > Nikos: >> Back in August, I thoroughly checked running the (modified) python script >> against each and every sensor's spectral response data (in form of CSVs) >> we have in our repo. >> >> I'll give it a quick check -- I can only work on it after December the >> 1st though. > > > The uploaded file is wrong in term of units. Please see the attached, > here-in, spectral response values (+ the output template) set in the > correct unit. It works fine for me. I think we had uploaded, back in > August, the "correct" one. No, we didn't upload any Quickbird related CSV in August... see log: https://trac.osgeo.org/grass/log/grass/trunk/imagery/i.atcorr But you are right, the first column got messed up in the reformatting of the CSV file. Fixed in SVN in r69943 (trunk), r69942 (7.2), r69941 (7.0). The result from python create_iwave.py sensors_csv/quickbird2.csv is quite different from the "rubbish" definition currently found in iwave.cpp (originates from r60610). I have updated the iwave.cpp code accordingly in all 7 branches and trunk. Yann, others: Please test. Markus ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
.. Yann: Also I believe the "less than 0.25" thing comes from either (or both) of these: static const float wli[5] = {0.001, 0.001, 0.001, 0.001, 0.001}; static const float wls[5] = {0.161, 0.161, 0.161, 0.161, 0.161}; line 2942 in iwave.cpp Nikos: Back in August, I thoroughly checked running the (modified) python script against each and every sensor's spectral response data (in form of CSVs) we have in our repo. I'll give it a quick check -- I can only work on it after December the 1st though. The uploaded file is wrong in term of units. Please see the attached, here-in, spectral response values (+ the output template) set in the correct unit. It works fine for me. I think we had uploaded, back in August, the "correct" one. Best, Nikos nm,pan,blue,green,red,nir 300,0,0,0,0,0 305,0,0,0,0,0 310,0,0,0,0,0 315,0,0,0,0,0 320,0,0,0,0,0 325,0,0.0010102,0,0,0.0014092 330,0,0.002051,0,0,0.0028608 335,0,0.0031232,0,0,0.0043557 340,0,0.0042264,0,0,0.005895 345,0,0.0045373,0,0,0.006329 350,0.0014033,0.0053218,0.0030856,0.0037148,0.0060022 355,0.001179,0.004057,0.0040267,0.002443,0.0053844 360,0.0011042,0.0032654,0.0021878,0.0016479,0.0035169 365,0.0009189,0.0027029,0.0023189,0.0019254,0.0021084 370,0.0011777,0.0023032,0.0014787,0.001181,0.0024355 375,0.0020335,0.0012599,0.0014276,0.0010728,0.0017002 380,0.0068664,0.0018015,0.0008263,0.0009032,0.0022714 385,0.0108822,0.0022036,0.0011403,0.0009703,0.0018699 390,0.0167311,0.0023949,0.0012422,0.0009224,0.0016207 395,0.0259192,0.0025521,0.0011512,0.0013128,0.0019495 400,0.0361999,0.0024719,0.0012394,0.000677,0.001831 405,0.0506315,0.0029075,0.0011408,0.0012157,0.0015098 410,0.0669468,0.0040027,0.0011869,0.0012567,0.0014986 415,0.0845848,0.0065597,0.0013912,0.0013207,0.0019432 420,0.1031961,0.0131362,0.0018941,0.0011522,0.0017185 425,0.121867,0.0283802,0.0023351,0.0009955,0.0024463 430,0.1449896,0.068135,0.0028135,0.001519,0.0025377 435,0.1683812,0.1551567,0.0037063,0.0020873,0.003128 440,0.1895051,0.2775976,0.0055455,0.0028027,0.00405 445,0.21272,0.4312732,0.0098195,0.0030937,0.0047331 450,0.2198261,0.6299497,0.0178466,0.0028875,0.0047484 455,0.2585699,0.7240532,0.0234254,0.0028213,0.0049004 460,0.2752517,0.791362,0.0300974,0.0029808,0.0041819 465,0.2955355,0.8438716,0.0411627,0.0034599,0.0044438 470,0.3153968,0.8895741,0.0596683,0.0036881,0.0047788 475,0.3364159,0.912,0.0981647,0.0031561,0.0052347 480,0.3456366,0.9293006,0.1566285,0.0020766,0.0055566 485,0.3546477,0.9601538,0.228192,0.0021746,0.0052475 490,0.3611199,1,0.3196465,0.0023823,0.0041908 495,0.3684864,0.9916359,0.4174751,0.0026856,0.0029904 500,0.3781246,0.9178985,0.5276728,0.0030709,0.0026452 505,0.3969294,0.7724284,0.6578772,0.0032914,0.0025776 510,0.4141351,0.5734303,0.7697888,0.0035025,0.0025379 515,0.4410028,0.3840363,0.8311977,0.0037279,0.0028625 520,0.4676101,0.2653482,0.8444885,0.0045702,0.0025801 525,0.4981964,0.1591609,0.8704719,0.0053096,0.0033657 530,0.5351925,0.0816323,0.9081774,0.0059502,0.0052825 535,0.5711692,0.0692367,0.9459902,0.006323,0.0078701 540,0.6137484,0.0633006,0.98194,0.0065926,0.0098718 545,0.6627288,0.0469325,1,0.0069161,0.0102328 550,0.7050662,0.0293462,0.9933748,0.0077701,0.0078634 555,0.7499391,0.0176386,0.9818187,0.0089839,0.0048711 560,0.7909615,0.0127288,0.9691108,0.0102276,0.0048416 565,0.8301127,0.0124551,0.9774484,0.0117892,0.0063449 570,0.8628948,0.0128916,0.9868932,0.0138696,0.0076518 575,0.891069,0.0126216,0.9652411,0.0176781,0.0079247 580,0.9250918,0.046,0.8979307,0.0237713,0.0064695 585,0.9334622,0.0100924,0.7909738,0.0334155,0.0043683 590,0.9518124,0.0095605,0.6550701,0.0464361,0.0037961 595,0.9620912,0.0092837,0.4822322,0.0630683,0.00374 600,0.9598312,0.0097672,0.3124203,0.0871887,0.0035986 605,0.990737,0.010639,0.2033228,0.1281145,0.0036339 610,0.9974814,0.0103876,0.1378029,0.2050211,0.0039231 615,0.9869457,0.0078934,0.0900831,0.3300581,0.0045064 620,1,0.0053712,0.0557136,0.4959814,0.0048696 625,0.9875694,0.0035571,0.0364832,0.6620421,0.005671 630,0.9878027,0.0026321,0.0278317,0.8053931,0.0060849 635,0.9662325,0.0025031,0.0261576,0.8839703,0.0067965 640,0.94831,0.0024856,0.027381,0.9112235,0.0072915 645,0.9197402,0.0025446,0.0275229,0.9418237,0.008561 650,0.9183001,0.0027851,0.0241831,0.9798105,0.0100233 655,0.8943635,0.0026625,0.0185783,0.9958087,0.0112326 660,0.8880265,0.0027425,0.0147736,1,0.0122499 665,0.8781178,0.003288,0.0131941,0.9922692,0.0129368 670,0.8949128,0.0044459,0.0132372,0.9523635,0.0135234 675,0.8892688,0.0088555,0.013176,0.872592,0.0143963 680,0.8822929,0.0161798,0.011635,0.7530428,0.0155814 685,0.8915592,0.0241669,0.0091548,0.6004284,0.0172409 690,0.8780062,0.0270878,0.0060522,0.423465,0.0195995 695,0.897761,0.0190696,0.0043438,0.2806013,0.0240677 700,0.378,0.008303,0.0032056,0.1650672,0.0294353 705,0.8713531,0.0056106,0.002855,0.0957075,0.0343437 710,0.8667318,0.0069981,0.0028712,0.0531459,0.0406824 715,0.8687264,0.0101687,0.00405,0.0302447,0.0489796 720,0.8711503,0.0120955,0.0061748,0.0219501,0.059924 725,0.862494
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
* Yann [2016-11-27 20:12:38 +0100]: On 27/11/2016 20:06, Markus Neteler wrote: On Sun, Nov 27, 2016 at 7:47 PM, Yann wrote: trying to run i.atcorr on an image of Colombo. i.atcorr --overwrite input=radxs.1 parameters=6s_b1.txt output=refxs.1 ... Segmentation fault (core dumped) I looked into the iwave.cpp, it seems OK. What is the wavelength being less than 0.25 micron, never seen that before... I wonder about this: grep 'ffu.s\[-' imagery/i.atcorr/iwave.cpp case 1: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr1[i]; case 2: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr2[i]; case 3: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr3[i]; case 4: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr4[i]; case 5: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr5[i]; Negative value (-99)? If I remember correctly the Quickbird support was added still without using the script. In r69930 (just now) I have added the Quickbird2 filter functions as CSV which I got from Nikos in August to that you may re-run the create_iwave.py script and compare the resulting iwave.cpp etc code to that present in the source code at time. Markus Thanks Markus, will look into that. Also I believe the "less than 0.25" thing comes from either (or both) of these: static const float wli[5] = {0.001, 0.001, 0.001, 0.001, 0.001}; static const float wls[5] = {0.161, 0.161, 0.161, 0.161, 0.161}; line 2942 in iwave.cpp Back in August, I thoroughly checked running the (modified) python script against each and every sensor's spectral response data (in form of CSVs) we have in our repo. I'll give it a quick check -- I can only work on it after December the 1st though. Nikos Back in August, I thoroughly checked running the (modified) script against each and every sensor's spectral response data (in form of CSVs) we have in our repo. I'll give it a quick check -- I can only work on it after December the 1st though. Nikos ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
It seems there is a bug in either the python file or the csv file. python create_iwave.py sensors_csv/quickbird2.csv > Getting sensor name from csv file: quickbird2 > Number of bands found: 5 Traceback (most recent call last): File "create_iwave.py", line 284, in main() File "create_iwave.py", line 270, in main write_cpp(bands, values, sensor, os.path.dirname(inputfile)) File "create_iwave.py", line 188, in write_cpp fi, li = interpolate_band(values[:,[0,b+1]]) File "create_iwave.py", line 122, in interpolate_band filter_f = f(np.arange(start, stop, step)) File "/usr/lib/python2.7/dist-packages/scipy/interpolate/polyint.py", line 79, in __call__ y = self._evaluate(x) File "/usr/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py", line 588, in _evaluate below_bounds, above_bounds = self._check_bounds(x_new) File "/usr/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py", line 620, in _check_bounds raise ValueError("A value in x_new is above the interpolation " ValueError: A value in x_new is above the interpolation range. On 27/11/2016 20:06, Markus Neteler wrote: On Sun, Nov 27, 2016 at 7:47 PM, Yann wrote: trying to run i.atcorr on an image of Colombo. i.atcorr --overwrite input=radxs.1 parameters=6s_b1.txt output=refxs.1 ... Segmentation fault (core dumped) I looked into the iwave.cpp, it seems OK. What is the wavelength being less than 0.25 micron, never seen that before... I wonder about this: grep 'ffu.s\[-' imagery/i.atcorr/iwave.cpp case 1: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr1[i]; case 2: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr2[i]; case 3: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr3[i]; case 4: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr4[i]; case 5: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr5[i]; Negative value (-99)? If I remember correctly the Quickbird support was added still without using the script. In r69930 (just now) I have added the Quickbird2 filter functions as CSV which I got from Nikos in August to that you may re-run the create_iwave.py script and compare the resulting iwave.cpp etc code to that present in the source code at time. Markus ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
On 27/11/2016 20:06, Markus Neteler wrote: On Sun, Nov 27, 2016 at 7:47 PM, Yann wrote: trying to run i.atcorr on an image of Colombo. i.atcorr --overwrite input=radxs.1 parameters=6s_b1.txt output=refxs.1 ... Segmentation fault (core dumped) I looked into the iwave.cpp, it seems OK. What is the wavelength being less than 0.25 micron, never seen that before... I wonder about this: grep 'ffu.s\[-' imagery/i.atcorr/iwave.cpp case 1: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr1[i]; case 2: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr2[i]; case 3: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr3[i]; case 4: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr4[i]; case 5: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr5[i]; Negative value (-99)? If I remember correctly the Quickbird support was added still without using the script. In r69930 (just now) I have added the Quickbird2 filter functions as CSV which I got from Nikos in August to that you may re-run the create_iwave.py script and compare the resulting iwave.cpp etc code to that present in the source code at time. Markus Thanks Markus, will look into that. Also I believe the "less than 0.25" thing comes from either (or both) of these: static const float wli[5] = {0.001, 0.001, 0.001, 0.001, 0.001}; static const float wls[5] = {0.161, 0.161, 0.161, 0.161, 0.161}; line 2942 in iwave.cpp ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] seg fault of i.atcorr on quickbird
On Sun, Nov 27, 2016 at 7:47 PM, Yann wrote: > trying to run i.atcorr on an image of Colombo. > > i.atcorr --overwrite input=radxs.1 parameters=6s_b1.txt output=refxs.1 ... > Segmentation fault (core dumped) > > I looked into the iwave.cpp, it seems OK. What is the wavelength being less > than 0.25 micron, never seen that before... I wonder about this: grep 'ffu.s\[-' imagery/i.atcorr/iwave.cpp case 1: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr1[i]; case 2: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr2[i]; case 3: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr3[i]; case 4: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr4[i]; case 5: for(i = 0; i < 65; i++) ffu.s[-99+i] = sr5[i]; Negative value (-99)? If I remember correctly the Quickbird support was added still without using the script. In r69930 (just now) I have added the Quickbird2 filter functions as CSV which I got from Nikos in August to that you may re-run the create_iwave.py script and compare the resulting iwave.cpp etc code to that present in the source code at time. Markus ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
[GRASS-dev] seg fault of i.atcorr on quickbird
Hi, trying to run i.atcorr on an image of Colombo. i.atcorr --overwrite input=radxs.1 parameters=6s_b1.txt output=refxs.1 param file: 17 - geometrical conditions=Quickbird 2 16 5.40 79.860 6.920 - month day hh.ddd longitude latitude ("hh.ddd" is in decimal hours GMT) 1- atmospheric mode=tropical 2- aerosols model=maritime 15 - visibility [km] (aerosol model concentration) -0.001 - mean target elevation above sea level [km] (here 1m asl) -1000- sensor height (here, sensor on board a satellite) 111 - Blue band of Quickbird Output: wavelength less than 0.25 micron: let's take s(l)=s(0.25) ... .. . wavelength less than 0.25 micron: let's take s(l)=s(0.25) Atmospheric correction... Segmentation fault (core dumped) I looked into the iwave.cpp, it seems OK. What is the wavelength being less than 0.25 micron, never seen that before... ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev