<div dir="ltr"><div><br><br>On Thu, Jan 25, 2018 at 10:51 AM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>><br>> Hi again,<br>><br>> Now, there is a new patch attached to the ticket (#3482 that also covers the update of S2A curves).<br><br></div>Your patch has e.g.<br><br>    /* SR_AV_B1 of sentinel_2B_msi */<br>    static const float sr1[17] = {<br>        .0076, .0059, .0053, .0025, .0026, .0034, .0035, .0506,<br>        .5946, .8712, .9090, .9460, .9615, 1.0000, .9591, .8855,<br>        .4542<br>    };<br><div><br></div><div>while I get</div><div><br></div><div>    /* SR_AV_B1 of sentinel_2B_msi */<br>    static const float sr1[21] = {<br>        .0000, .0000, .0076, .0059, .0053, .0025, .0026, .0034,<br>        .0035, .0506, .5946, .8712, .9090, .9460, .9615, 1.0000,<br>        .9591, .8855, .4542, .0305, .0000<br>    };<br></div><div><br></div><div>i.e. I get a few more values at the beginning and end. Same for other bands, where your patch is missing some relatively high values.</div><div><br></div><div>Did you use the latest create_iwave.py in trunk?<br></div><div><br></div><div>><br>> If those changes are applicable to 7.4(.1?) too, I can provide a diff for the release branch as well…<br></div><div><br></div><div>For 7.4, the response values in iwave.cpp could be updated.<br></div><div><br></div><div>><br>> In addition I opened a new ticket for updating the other sensors (<a href="https://trac.osgeo.org/grass/ticket/3483">https://trac.osgeo.org/grass/ticket/3483</a>).<br>><br>> I expect that I will update the curves for the sensors one by one (starting with worldview2/3), cause I don`t think I manage to do all at once …<br></div><div><br></div><div>One by one makes sense.</div><div><br></div><div>Markus M<br></div><div>><br>>  <br>><br>> And thanks again for all the support we received!<br>><br>>  <br>><br>> Cheers<br>><br>> Stefan<br>><br>>  <br>><br>>  <br>><br>> From: Stefan Blumentrath<br>> Sent: onsdag 24. januar 2018 14.55<br>> To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>>; Žofie Cimburová <<a href="mailto:zoficimburova@gmail.com">zoficimburova@gmail.com</a>><br>> Cc: GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> Subject: RE: [GRASS-user] i.atcorr with Sentinel2<br>><br>>  <br>><br>> So, now there are two updated patches attached to: <a href="https://trac.osgeo.org/grass/ticket/3482">https://trac.osgeo.org/grass/ticket/3482</a><br>><br>> One for changes in create_iwave.py and one to add S2B curves.<br>><br>>  <br>><br>> Big thanks to all (and esp. Markus M) who put effort into checking, fixing, guiding  and helping us with S-2 in i.atcorr!<br>><br>> Very much appreciated!<br>><br>>  <br>><br>> Hope the latest changes are OK, so I can update S2A too.<br>><br>>  <br>><br>> Cheers<br>><br>> Stefan<br>><br>>  <br>><br>> From: grass-user [mailto:<a href="mailto:grass-user-bounces@lists.osgeo.org">grass-user-bounces@lists.osgeo.org</a>] On Behalf Of Stefan Blumentrath<br>> Sent: onsdag 24. januar 2018 09.55<br>> To: Žofie Cimburová <<a href="mailto:zoficimburova@gmail.com">zoficimburova@gmail.com</a>><br>> Cc: GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> Subject: Re: [GRASS-user] i.atcorr with Sentinel2<br>><br>>  <br>><br>> Hi Zofie,<br>><br>>  <br>><br>> Markus M found some issues in my version of create_iwave.py.<br>><br>> I am fixing them right now!<br>><br>>  <br>><br>> Cheers<br>><br>> Stefan<br>><br>>  <br>><br>> From: Žofie Cimburová [mailto:<a href="mailto:zoficimburova@gmail.com">zoficimburova@gmail.com</a>]<br>> Sent: onsdag 24. januar 2018 09.32<br>> To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>> Cc: Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>>; GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> Subject: Re: [GRASS-user] i.atcorr with Sentinel2<br>><br>>  <br>><br>> On Wed, Jan 24, 2018 at 12:35 AM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>><br>> Hi again,<br>><br>>  <br>><br>> So, I did not prioritize tests for the time being and added a first attempt for a diff to <a href="https://trac.osgeo.org/grass/ticket/3482">https://trac.osgeo.org/grass/ticket/3482</a><br>><br>> I would be happy if someone could review…<br>><br>> i.atcorr compiles fine with the changes, works for S2B and gives non-NULL results.<br>><br>>  <br>><br>> Zofie can you test with proper S2B data?<br>><br>>  <br>><br>> Hi, I tested with one scene of S2B data and all bands, and the results look good. (Not sure how to test if they're 100 % correct, but they at least seem to make sense.)<br>><br>> Best,<br>><br>> Zofie<br>><br>>  <br>><br>> Cheers<br>><br>> Stefan<br>><br>>  <br>><br>> From: Markus Metz [mailto:<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>]<br>> Sent: tirsdag 23. januar 2018 15.31<br>> To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>> Cc: Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>>; GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>><br>><br>> Subject: Re: [GRASS-user] i.atcorr with Sentinel2<br>><br>>  <br>><br>><br>><br>> On Tue, Jan 23, 2018 at 3:24 PM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>> ><br>> > OK, sounds doable for me ;-).<br>> > Will look at it tonight. Most of the other changes for Sentinel-2B are already in place (I hope).<br>><br>> Great!<br>><br>> > Not sure if I manage to add python tests as well, looks like current tests are more manual?<br>><br>> Apparently results differ between operating systems, therefore tests won't work well, unless you test if the output is all NULL, in which case a fatal error should be produced anyway.<br>><br>> Markus M<br>><br>> ><br>> > Cheers<br>> > Stefan<br>> > ________________________________________<br>> > Von: Markus Metz [<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>]<br>> > Gesendet: Dienstag, 23. Januar 2018 14:50<br>> > An: Stefan Blumentrath<br>> > Cc: Markus Neteler; GRASS user list<br>> > Betreff: Re: [GRASS-user] i.atcorr with Sentinel2<br>> ><br>> > On Tue, Jan 23, 2018 at 2:19 PM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a><mailto:<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>>> wrote:<br>> > ><br>> > > OK, will give it a try.<br>> > ><br>> > The first part is more important because it 1) fixes the interpolation to 2.5 nm steps, and 2) helps iwave.cpp to load the response values.<br>> > ><br>> > > For the second part I am not sure if I properly understood where min - max wavelength for each band should be printed to.<br>> > ><br>> > > Do you mean to replace<br>> > ><br>> > >     # convert limits from nanometers to micrometers<br>> > ><br>> > >     lowerlimit = wavelengths[0]/1000<br>> > ><br>> > >     upperlimit = wavelengths[-1]/1000<br>> > ><br>> > ><br>> > ><br>> > > Or just as a screen output?<br>> ><br>> > Just a screen output to help update the manual<br>> > ><br>> > > You did not mean band value limits, right?<br>> ><br>> > No, e.g. in the manual is<br>> ><br>> > Sentinel2A Coastal blue band B1 (430nm - 457nm)<br>> ><br>> > and this range could be printed out to screen based on the actual response. This range can then be copied to the manual, making life a bit easier for the person updating the manual.<br>> > ><br>> > > Not sure I am of help/useful for fixing create_iwave.py, but I`ll do my best.<br>> ><br>> > Your help is welcome!<br>> ><br>> > Markus M<br>> ><br>> > ><br>> > > Cheers<br>> > ><br>> > > Stefan<br>> > ><br>> > ><br>> > ><br>> > ><br>> > ><br>> > > From: Markus Metz [mailto:<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a><mailto:<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>>]<br>> > > Sent: tirsdag 23. januar 2018 13.02<br>> > > To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a><mailto:<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>>><br>> > > Cc: Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a><mailto:<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>>>; GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><mailto:<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>>><br>> > ><br>> > ><br>> > > Subject: Re: [GRASS-user] i.atcorr with Sentinel2<br>> > ><br>> > ><br>> > ><br>> > ><br>> > ><br>> > > On Tue, Jan 23, 2018 at 12:25 PM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a><mailto:<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>>> wrote:<br>> > > ><br>> > > > No problem. Any chance I can contribute to maintenance of create_iwave.py?<br>> > > ><br>> > > > What needs to be done? Take your latest changes into account?<br>> > ><br>> > > nodata handling should be changed. In read_input(), missing values should be set to zero. Then for each band, leading and trailing zeros would be set to -1. This helps interpolate_band() to get the correct subrange.<br>> > ><br>> > > For each band, create_iwave.py should print out the band name and the wavelength as min - max. Care must be taken when finding reasonable min and max wavelengths: find the max response, then go back while response > threshold to find the min wavelength. Go forward while response > threshold to find the max wavelength. As threshold I suggest 0.1 to eliminate noise in the response values.<br>> > ><br>> > > Markus M<br>> > ><br>> > > ><br>> > > ><br>> > > ><br>> > > > If you think it makes sense I will try to create a patch for adding S2B to i.atcorr (would be a nice exercise and does not seem too complex)? Will open a ticket and start working on it unless you tell me different.<br>> > > ><br>> > > ><br>> > > ><br>> > > > Cheers<br>> > > ><br>> > > > Stefan<br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > > From: grass-user [mailto:<a href="mailto:grass-user-bounces@lists.osgeo.org">grass-user-bounces@lists.osgeo.org</a><mailto:<a href="mailto:grass-user-bounces@lists.osgeo.org">grass-user-bounces@lists.osgeo.org</a>>] On Behalf Of Markus Metz<br>> > > > Sent: tirsdag 23. januar 2018 12.03<br>> > > > To: Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a><mailto:<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>>><br>> > > > Cc: GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><mailto:<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>>><br>> > > > Subject: Re: [GRASS-user] i.atcorr with Sentinel2<br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > > On Tue, Jan 23, 2018 at 11:51 AM, Markus Neteler <<br>> > > > <a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a><mailto:<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>>> wrote:<br>> > > ><br>> > > > ><br>> > > > > On Tue, Jan 23, 2018 at 11:09 AM, Žofie Cimburová<br>> > > > > <<br>> > > > <a href="mailto:zoficimburova@gmail.com">zoficimburova@gmail.com</a><mailto:<a href="mailto:zoficimburova@gmail.com">zoficimburova@gmail.com</a>>> wrote:<br>> > > ><br>> > > > > > Forgot to cc the list.<br>> > > > > ><br>> > > > > > The CSV and the cpp template:<br>> > > > > ><br>> > > > <a href="https://www.dropbox.com/sh/9cnhsl59kvmx4o1/AABwnEVHdxfW_PqrB5Xcpczda?dl=0">https://www.dropbox.com/sh/9cnhsl59kvmx4o1/AABwnEVHdxfW_PqrB5Xcpczda?dl=0</a><br>> > > ><br>> > > > ><br>> > > > > Great! Would you mind to also convert the S2A table? AFAIK it got<br>> > > > > updated due to recalibration compared to what we currently have.<br>> > > ><br>> > > > please wait a bit with creating the cpp template, create_iwave.py needs some maintenance<br>> > > ><br>> > > > Markus M<br>> > > ><br>> > > ><br>> > > ><br>> > > > ><br>> > > > > markusN<br>> > > > > _______________________________________________<br>> > > > > grass-user mailing list<br>> > > > > <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><mailto:<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> > > > > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>> ><br>><br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>><br>>  <br>><br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div><br></div>