[GRASS-user] i.atcorr range and rescale parameters for Sentinel 2 images

Hi all,

I’m testing i.atcorr (grass 7.4) with Sentinel 2A images and i have some trouble defining the right values for range and rescale parameters. I read in other posts and lists that the suggested value for both range and rescale is ‘0,10000’ while in other posts someone else suggests to use min and max values (from r.info) for range and ‘1,10000’ or ‘0, 10000’ for rescale.

It’s not clear to me the right meaning of these parameters and thus the most correct values to be used.

Can anyone better explain me the meaning of these two parameters?

I tested all the values suggested in other posts but I can’t understand what they exactly do.

Thank you in advance for your help!

Roberta

On Thu, Feb 8, 2018 at 8:54 PM, roberta fagandini <robifagandini@hotmail.it> wrote:

Hi all,

I’m testing i.atcorr (grass 7.4) with Sentinel 2A images and i have some trouble defining the right values for range and rescale parameters. I read in other posts and lists that the suggested value for both range and rescale is ‘0,10000’ while in other posts someone else suggests to use min and max values (from r.info) for range and ‘1,10000’ or ‘0, 10000’ for rescale.

It’s not clear to me the right meaning of these parameters and thus the most correct values to be used.

Can anyone better explain me the meaning of these two parameters?

In Sentinel2, the value 0 means nodata, therefore the range must start with 1. The QUANTIFICATION_VALUE from the metadata (now 10000, previously 1000) should be used as upper limit for range. Thus try range=1,10000 rescale=1,10000.

Markus M

I tested all the values suggested in other posts but I can’t understand what they exactly do.

Thank you in advance for your help!

Roberta


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Hi Roberta,

···

On Thu, Feb 8, 2018 at 8:54 PM, roberta fagandini <robifagandini@hotmail.it> wrote:

Hi all,

I’m testing i.atcorr (grass 7.4) with Sentinel 2A images and i have some trouble defining the right values for range and rescale parameters. I read in other posts and lists that the suggested value for both range and rescale is ‘0,10000’ while in other posts someone else suggests to use min and max values (from r.info) for range and ‘1,10000’ or ‘0, 10000’ for rescale.

It’s not clear to me the right meaning of these parameters and thus the most correct values to be used.

Can anyone better explain me the meaning of these two parameters?

When I was running i.atcorr for Sentinel2 data, I used range=1,10000 (i.e. the min/max theoretical values the input data can reach).
As for rescale, this in my understanding just sets what the output range of the reflectances will be. So you can use for example 1-255, 0-1, 1-10000, whatever suits best to your further analysis. Relatively, the result will be identical.

Hope that helps a bit!

Zofie

I tested all the values suggested in other posts but I can’t understand what they exactly do.

Thank you in advance for your help!

Roberta


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Hi Markus and Žofie,

thank you for your hints!

I tested i.atcorr with range=1,10000 and rescale=1,10000. In this way, value 10000 is assigned to all those pixels with reflectance greater than 10000 in the not-corrected image band (I’m using a blue band with min=1 and max= 21604). If I set range=1,21604 and rescale=1,10000 in this case, the output is an image with values ranging from 1 to 10000 (because of the rescale parameter) but all the pixels with reflectance > 10000 in the not-corrected image band have different values near 10000 and proportionally rescaled but not rigidly set to 10000.

Just to be clearer, here some examples querying some pixels of the images :

#B02_not_corrected (original blue band)

px1_value: 21604

px2_value: 17869

px3_value: 18500

#B02_range_rescale_1,10000 (i.atcorr output with range=1,10000 and rescale=1,10000)

px1_value: 10000

px2_value: 10000

px3_value: 10000

#B02_range1,21604_rescale1,10000 (i.atcorr output with range=1,21604 and rescale=1,10000)

px1_value: 10000
px2_value: 9055
px3_value: 9352

Therefore the meaning of the range parameter is still not so clear to me. Do you have other information about it and how it works?

Thank you for your help!
Roberta

···

Da: Žofie Cimburová zoficimburova@gmail.com
Inviato: venerdì 9 febbraio 2018 21:01
A: roberta fagandini
Cc: grass-user@lists.osgeo.org
Oggetto: Re: [GRASS-user] i.atcorr range and rescale parameters for Sentinel 2 images

Hi Roberta,

On Thu, Feb 8, 2018 at 8:54 PM, roberta fagandini <robifagandini@hotmail.it> wrote:

Hi all,

I’m testing i.atcorr (grass 7.4) with Sentinel 2A images and i have some trouble defining the right values for range and rescale parameters. I read in other posts and lists that the suggested value for both range and rescale is ‘0,10000’ while in other posts someone else suggests to use min and max values (from r.info) for range and ‘1,10000’ or ‘0, 10000’ for rescale.

It’s not clear to me the right meaning of these parameters and thus the most correct values to be used.

Can anyone better explain me the meaning of these two parameters?

When I was running i.atcorr for Sentinel2 data, I used range=1,10000 (i.e. the min/max theoretical values the input data can reach).
As for rescale, this in my understanding just sets what the output range of the reflectances will be. So you can use for example 1-255, 0-1, 1-10000, whatever suits best to your further analysis. Relatively, the result will be identical.

Hope that helps a bit!

Zofie

I tested all the values suggested in other posts but I can’t understand what they exactly do.

Thank you in advance for your help!

Roberta


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Sat, Feb 10, 2018 at 6:11 PM, roberta fagandini <robifagandini@hotmail.it> wrote:

Hi Markus and Žofie,

thank you for your hints!

I tested i.atcorr with range=1,10000 and rescale=1,10000. In this way, value 10000 is assigned to all those pixels with reflectance greater than 10000 in the not-corrected image band (I’m using a blue band with min=1 and max= 21604). If I set range=1,21604 and rescale=1,10000 in this case, the output is an image with values ranging from 1 to 10000 (because of the rescale parameter) but all the pixels with reflectance > 10000 in the not-corrected image band have different values near 10000 and proportionally rescaled but not rigidly set to 10000.

This is correct because some few pixels might have values > 10000. Rescaling the input with 10000 means reflectance = pixel_value / 10000, i.e. values larger than 1 can occur which is correct. Internally, i.atcorr produces values in the range [0, 1]. These values are rescaled with the rescale option. If you use rescale=1,10000, output values will be within the range [1, 10000], not exceeding this range. The correct range option for i.atcorr with sentinel2 is 1,QUANTIFICATION_VALUE. As Zofie said, you can set the rescale option to your needs.

Markus M

Just to be clearer, here some examples querying some pixels of the images :

#B02_not_corrected (original blue band)

px1_value: 21604

px2_value: 17869

px3_value: 18500

#B02_range_rescale_1,10000 (i.atcorr output with range=1,10000 and rescale=1,10000)

px1_value: 10000

px2_value: 10000

px3_value: 10000

#B02_range1,21604_rescale1,10000 (i.atcorr output with range=1,21604 and rescale=1,10000)

px1_value: 10000
px2_value: 9055
px3_value: 9352

Therefore the meaning of the range parameter is still not so clear to me. Do you have other information about it and how it works?

Thank you for your help!
Roberta


Da: Žofie Cimburová <zoficimburova@gmail.com>
Inviato: venerdì 9 febbraio 2018 21:01
A: roberta fagandini
Cc: grass-user@lists.osgeo.org
Oggetto: Re: [GRASS-user] i.atcorr range and rescale parameters for Sentinel 2 images

Hi Roberta,

On Thu, Feb 8, 2018 at 8:54 PM, roberta fagandini <robifagandini@hotmail.it> wrote:

Hi all,

I’m testing i.atcorr (grass 7.4) with Sentinel 2A images and i have some trouble defining the right values for range and rescale parameters. I read in other posts and lists that the suggested value for both range and rescale is ‘0,10000’ while in other posts someone else suggests to use min and max values (from r.info) for range and ‘1,10000’ or ‘0, 10000’ for rescale.

It’s not clear to me the right meaning of these parameters and thus the most correct values to be used.

Can anyone better explain me the meaning of these two parameters?

When I was running i.atcorr for Sentinel2 data, I used range=1,10000 (i.e. the min/max theoretical values the input data can reach).
As for rescale, this in my understanding just sets what the output range of the reflectances will be. So you can use for example 1-255, 0-1, 1-10000, whatever suits best to your further analysis. Relatively, the result will be identical.

Hope that helps a bit!
Zofie

I tested all the values suggested in other posts but I can’t understand what they exactly do.

Thank you in advance for your help!

Roberta


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user