Re: i.atcorr with Sentinel2

Markus Metz <[email protected]>
Newsgroups gmane.comp.gis.grass.user
Message-ID <CAG+h=FGkWJC-wqGZJJi8NOKB2hd1vcEW6LZysT_9yEr6+we2fw@mail.gmail.com>
On Thu, Jan 25, 2018 at 1:11 PM, Stefan Blumentrath <
[email protected]> wrote:
>
> Just updated the patch attached to the ticket. Let`s hope it is the last
one I have to upload ;-).
>
>
>
> I double checked that I use the right create_iwave.py and that values are
the ones MarkusM got.
>
> Then I updated iwave.cpp and i.atcorr.html with results from the new run
of create_iwave.py.

Looks good to me, please submit to trunk.

Markus M
>
>
>
> Cheers
>
> Stefan
>
>
>
>
>
> From: grass-user [mailto:[email protected]] On Behalf Of
Stefan Blumentrath
> Sent: torsdag 25. januar 2018 11.30
> To: Markus Metz <[email protected]>
>
>
> Cc: GRASS user list <[email protected]>
> Subject: Re: [GRASS-user] i.atcorr with Sentinel2
>
>
>
> Thanks for double checking!
>
>
>
> Indeed, I used for some reason the old version of create_iwave.py. I ran
svn up and chose “their side of the conflict” for the script. However, I
really should have double checked.
>
>
>
> Will update the patch immediately…
>
>
>
> Cheers
>
> Stefan
>
>
>
>
>
>
>
> From: Markus Metz [mailto:[email protected]]
> Sent: torsdag 25. januar 2018 11.16
> To: Stefan Blumentrath <[email protected]>
> Cc: GRASS user list <[email protected]>
> Subject: Re: [GRASS-user] i.atcorr with Sentinel2
>
>
>
>
>
> On Thu, Jan 25, 2018 at 10:51 AM, Stefan Blumentrath <
[email protected]> wrote:
> >
> > Hi again,
> >
> > Now, there is a new patch attached to the ticket (#3482 that also
covers the update of S2A curves).
>
> Your patch has e.g.
>
>     /* SR_AV_B1 of sentinel_2B_msi */
>     static const float sr1[17] = {
>         .0076, .0059, .0053, .0025, .0026, .0034, .0035, .0506,
>         .5946, .8712, .9090, .9460, .9615, 1.0000, .9591, .8855,
>         .4542
>     };
>
>
>
> while I get
>
>
>
>     /* SR_AV_B1 of sentinel_2B_msi */
>     static const float sr1[21] = {
>         .0000, .0000, .0076, .0059, .0053, .0025, .0026, .0034,
>         .0035, .0506, .5946, .8712, .9090, .9460, .9615, 1.0000,
>         .9591, .8855, .4542, .0305, .0000
>     };
>
>
>
> 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.
>
>
>
> Did you use the latest create_iwave.py in trunk?
>
>
>
> >
> > If those changes are applicable to 7.4(.1?) too, I can provide a diff
for the release branch as well…
>
>
>
> For 7.4, the response values in iwave.cpp could be updated.
>
>
>
> >
> > In addition I opened a new ticket for updating the other sensors (
https://trac.osgeo.org/grass/ticket/3483).
> >
> > 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 …
>
>
>
> One by one makes sense.
>
>
>
> Markus M
>
> >
> >
> >
> > And thanks again for all the support we received!
> >
> >
> >
> > Cheers
> >
> > Stefan
> >
> >
> >
> >
> >
> > From: Stefan Blumentrath
> > Sent: onsdag 24. januar 2018 14.55
> > To: Stefan Blumentrath <[email protected]>; Žofie Cimburová <
[email protected]>
> > Cc: GRASS user list <[email protected]>
> > Subject: RE: [GRASS-user] i.atcorr with Sentinel2
> >
> >
> >
> > So, now there are two updated patches attached to:
https://trac.osgeo.org/grass/ticket/3482
> >
> > One for changes in create_iwave.py and one to add S2B curves.
> >
> >
> >
> > Big thanks to all (and esp. Markus M) who put effort into checking,
fixing, guiding  and helping us with S-2 in i.atcorr!
> >
> > Very much appreciated!
> >
> >
> >
> > Hope the latest changes are OK, so I can update S2A too.
> >
> >
> >
> > Cheers
> >
> > Stefan
> >
> >
> >
> > From: grass-user [mailto:[email protected]] On Behalf
Of Stefan Blumentrath
> > Sent: onsdag 24. januar 2018 09.55
> > To: Žofie Cimburová <[email protected]>
> > Cc: GRASS user list <[email protected]>
> > Subject: Re: [GRASS-user] i.atcorr with Sentinel2
> >
> >
> >
> > Hi Zofie,
> >
> >
> >
> > Markus M found some issues in my version of create_iwave.py.
> >
> > I am fixing them right now!
> >
> >
> >
> > Cheers
> >
> > Stefan
> >
> >
> >
> > From: Žofie Cimburová [mailto:[email protected]]
> > Sent: onsdag 24. januar 2018 09.32
> > To: Stefan Blumentrath <[email protected]>
> > Cc: Markus Metz <[email protected]>; GRASS user list <
[email protected]>
> > Subject: Re: [GRASS-user] i.atcorr with Sentinel2
> >
> >
> >
> > On Wed, Jan 24, 2018 at 12:35 AM, Stefan Blumentrath <
[email protected]> wrote:
> >
> > Hi again,
> >
> >
> >
> > So, I did not prioritize tests for the time being and added a first
attempt for a diff to https://trac.osgeo.org/grass/ticket/3482
> >
> > I would be happy if someone could review…
> >
> > i.atcorr compiles fine with the changes, works for S2B and gives
non-NULL results.
> >
> >
> >
> > Zofie can you test with proper S2B data?
> >
> >
> >
> > 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.)
> >
> > Best,
> >
> > Zofie
> >
> >
> >
> > Cheers
> >
> > Stefan
> >
> >
> >
> > From: Markus Metz [mailto:[email protected]]
> > Sent: tirsdag 23. januar 2018 15.31
> > To: Stefan Blumentrath <[email protected]>
> > Cc: Markus Neteler <[email protected]>; GRASS user list <
[email protected]>
> >
> >
> > Subject: Re: [GRASS-user] i.atcorr with Sentinel2
> >
> >
> >
> >
> >
> > On Tue, Jan 23, 2018 at 3:24 PM, Stefan Blumentrath <
[email protected]> wrote:
> > >
> > > OK, sounds doable for me ;-).
> > > Will look at it tonight. Most of the other changes for Sentinel-2B
are already in place (I hope).
> >
> > Great!
> >
> > > Not sure if I manage to add python tests as well, looks like current
tests are more manual?
> >
> > 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.
> >
> > Markus M
> >
> > >
> > > Cheers
> > > Stefan
> > > ________________________________________
> > > Von: Markus Metz [[email protected]]
> > > Gesendet: Dienstag, 23. Januar 2018 14:50
> > > An: Stefan Blumentrath
> > > Cc: Markus Neteler; GRASS user list
> > > Betreff: Re: [GRASS-user] i.atcorr with Sentinel2
> > >
> > > On Tue, Jan 23, 2018 at 2:19 PM, Stefan Blumentrath <
[email protected]<mailto:[email protected]>> wrote:
> > > >
> > > > OK, will give it a try.
> > > >
> > > 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.
> > > >
> > > > For the second part I am not sure if I properly understood where
min - max wavelength for each band should be printed to.
> > > >
> > > > Do you mean to replace
> > > >
> > > >     # convert limits from nanometers to micrometers
> > > >
> > > >     lowerlimit = wavelengths[0]/1000
> > > >
> > > >     upperlimit = wavelengths[-1]/1000
> > > >
> > > >
> > > >
> > > > Or just as a screen output?
> > >
> > > Just a screen output to help update the manual
> > > >
> > > > You did not mean band value limits, right?
> > >
> > > No, e.g. in the manual is
> > >
> > > Sentinel2A Coastal blue band B1 (430nm - 457nm)
> > >
> > > 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.
> > > >
> > > > Not sure I am of help/useful for fixing create_iwave.py, but I`ll
do my best.
> > >
> > > Your help is welcome!
> > >
> > > Markus M
> > >
> > > >
> > > > Cheers
> > > >
> > > > Stefan
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > From: Markus Metz [mailto:[email protected]<mailto:
[email protected]>]
> > > > Sent: tirsdag 23. januar 2018 13.02
> > > > To: Stefan Blumentrath <[email protected]<mailto:
[email protected]>>
> > > > Cc: Markus Neteler <[email protected]<mailto:[email protected]>>;
GRASS user list <[email protected]<mailto:
[email protected]>>
> > > >
> > > >
> > > > Subject: Re: [GRASS-user] i.atcorr with Sentinel2
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Jan 23, 2018 at 12:25 PM, Stefan Blumentrath <
[email protected]<mailto:[email protected]>> wrote:
> > > > >
> > > > > No problem. Any chance I can contribute to maintenance of
create_iwave.py?
> > > > >
> > > > > What needs to be done? Take your latest changes into account?
> > > >
> > > > 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.
> > > >
> > > > 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.
> > > >
> > > > Markus M
> > > >
> > > > >
> > > > >
> > > > >
> > > > > 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.
> > > > >
> > > > >
> > > > >
> > > > > Cheers
> > > > >
> > > > > Stefan
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > From: grass-user [mailto:[email protected]
<mailto:[email protected]>] On Behalf Of Markus Metz
> > > > > Sent: tirsdag 23. januar 2018 12.03
> > > > > To: Markus Neteler <[email protected]<mailto:[email protected]>>
> > > > > Cc: GRASS user list <[email protected]<mailto:
[email protected]>>
> > > > > Subject: Re: [GRASS-user] i.atcorr with Sentinel2
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Jan 23, 2018 at 11:51 AM, Markus Neteler <
> > > > > [email protected]<mailto:[email protected]>> wrote:
> > > > >
> > > > > >
> > > > > > On Tue, Jan 23, 2018 at 11:09 AM, Žofie Cimburová
> > > > > > <
> > > > > [email protected]<mailto:[email protected]>> wrote:
> > > > >
> > > > > > > Forgot to cc the list.
> > > > > > >
> > > > > > > The CSV and the cpp template:
> > > > > > >
> > > > >
https://www.dropbox.com/sh/9cnhsl59kvmx4o1/AABwnEVHdxfW_PqrB5Xcpczda?dl=0
> > > > >
> > > > > >
> > > > > > Great! Would you mind to also convert the S2A table? AFAIK it
got
> > > > > > updated due to recalibration compared to what we currently have.
> > > > >
> > > > > please wait a bit with creating the cpp template, create_iwave.py
needs some maintenance
> > > > >
> > > > > Markus M
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > markusN
> > > > > > _______________________________________________
> > > > > > grass-user mailing list
> > > > > > [email protected]<mailto:[email protected]>
> > > > > > https://lists.osgeo.org/mailman/listinfo/grass-user
> > >
> >
> >
> > _______________________________________________
> > grass-user mailing list
> > [email protected]
> > https://lists.osgeo.org/mailman/listinfo/grass-user
> >
> >
> >
> >
> > _______________________________________________
> > grass-user mailing list
> > [email protected]
> > https://lists.osgeo.org/mailman/listinfo/grass-user
>
>

_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.