<div dir="ltr"><div>Hi Carlos,<br><br></div>From the manual [1], the 0-255 rescaling is default. So I believe if you want to use some other rescaling, you have to do it manually. To be honest, I never understood what are the best options to use in the rescale parameter. I imagine the 0-255 is reminiscent from the 8-bit images. So what about higher bit images. Should we use other rescaling factors?<br><br><br><br>[1]: <a href="https://grass.osgeo.org/grass71/manuals/i.atcorr.html">https://grass.osgeo.org/grass71/manuals/i.atcorr.html</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 11:40 AM, Carlos Grohmann <span dir="ltr"><<a href="mailto:carlos.grohmann@gmail.com" target="_blank">carlos.grohmann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Daniel!<div><br></div><div>That was really dumb of not double-checking the input parameters..</div><div><br></div><div>Now another problem: the resulting image is empty! <a href="http://r.info" target="_blank">r.info</a> returns "min = nan  max = nan".</div><div><br></div><div>I tried with radiance and reflectance as inputs. One thing that I realized is that, even though I'm not setting it to rescale the output range, it's doing it:</div><div><br></div><div><div> |   Comments:                                                                |</div><div> |    i.atcorr --overwrite --verbose -r input="ast_18560.01.toa_reflectanc\   |</div><div> |    e@lateritas" range=0,255 elevation="srtm_xingu_3sec@lateritas" param\   |</div><div> |    eters="/Volumes/MacintoshHD2/Dropbox/USP/projetosPesquisa/Xingu_late\   |</div><div> |    ritas/aster/params6s_ast_18560.txt" output="ast_18560.01.toa_reflect\   |</div><div> |    ance_atcorr_6s" rescale=0,255 </div></div><div><br></div><div>Here I didn't set neither range nor rescale (left them blank), but apparently the command is not respecting my choices. bug detected?</div><div><br></div><div>After this I tried setting the input range and rescale options, but without success. Still an empty raster...</div><div><br></div><div>best</div><div><br></div><div>Carlos</div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 8:54 AM, Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div>Carlos,<br><br></div>The aerosol model is the 4th line in the parameter file. You have set the aerosol model to 15. But in the i.atcor manual, the values range from 0 to 11. Could that be the problem? i.atcor issues an unknown aerosol model warning and assumes you are trying to enter aerosol models by hand. Hence it sets your visibility to -0.1 (ground altitude) and other parameters wrong.<br><br></div>Cheers<br></div>Daniel<br> <br><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Mar 18, 2016 at 4:49 PM, Carlos Grohmann <span dir="ltr"><<a href="mailto:carlos.grohmann@gmail.com" target="_blank">carlos.grohmann@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><div>Hi all. </div><div><br></div><div>I'm trying to run some atmospheric correction of ASTER images. First I calculated radiance and reflectance (with my own script, not i.aster.toar).  I've tried with radiance and reflectance as input, but both end up in a segfault.. the parameters file has this content:</div><div><br></div><div><div>10</div><div>6 22 13.99 -51.931 -3.355</div><div>1</div><div>15</div><div>-0.100</div><div>-1000</div><div>72</div></div><div><br></div><div><br></div><div>and this is the call to i.atcorr and the error:</div><div>(region is defined to the raster)</div><div><br></div><div> i.atcorr --overwrite --verbose input=ast_18560.01.radiance elevation=srtm_xingu_3sec parameters=params6s_ast_18560.txt output=ast_18560.01.radiance_atcorr</div><div><br></div><div>WARNING: Unknown aerosol model!</div><div> wavelength  less  than  0.25  micron: </div><div> let's take s(l)=s(0.25)</div><div><br></div><div><br></div><div><br></div><div>* ****************************** 6s version 4.2b ****************************** *</div><div>*                        geometrical conditions identity                        *</div><div>*                        -------------------------------                        *</div><div>*                        ASTER    observation                                   *</div><div>*                                                                               *</div><div>*    month: 6 day: 22                                                          *</div><div>*    solar zenith angle:   34.61 deg  solar azimuthal angle:       38.12 deg   *</div><div>*    view zenith angle:     0.00 deg  view azimuthal angle:         0.00 deg   *</div><div>*    scattering angle:    145.39 deg  azimuthal angle difference:  38.12 deg   *</div><div>*                                                                               *</div><div>*                        atmospheric model description                          *</div><div>*                        -----------------------------                          *</div><div>*            atmospheric model identity :                                       *</div><div>*                tropical            (uh2o=4.12g/cm2,uo3=.247cm-atm)            *</div><div>*                                                                               *</div><div>*            aerosols type identity :                                           *</div><div>*                 user defined aerosols model                                   *</div><div>*                                                                               *</div><div>*            optical condition identity :                                       *</div><div>*                 visibility :   -0.10 km  opt. thick. 550nm :   0.0000       *</div><div>*                                                                               *</div><div>*                        spectral condition                                     *</div><div>*                        ------------------                                     *</div><div>*                                                                               *</div><div>*                        target type                                            *</div><div>*                        -----------                                            *</div><div>*            homogeneous ground                                                 *</div><div>*              constant reflectance over the spectra     0.000                 *</div><div>*                                                                               *</div><div>*                        target elevation description                           *</div><div>*                        ----------------------------                           *</div><div>*            ground pressure  [mb]          0.00                               *</div><div>*            ground altitude  [km]       99.990                                *</div><div>*                 gaseous content at target level:                              *</div><div>*                 uh2o=    0.000 g/cm2        uo3=    0.000 cm-atm             *</div><div>*                                                                               *</div><div>*                        plane simulation description                           *</div><div>*                        ----------------------------                           *</div><div>*            plane  pressure          [mb]      0.00                           *</div><div>*            plane  altitude absolute [km] 396884967424.000                    *</div><div>*                 atmosphere under plane description:                           *</div><div>*                 ozone content                0.000                           *</div><div>*                 h2o   content                0.000                           *</div><div>*                aerosol opt. thick. 550nm     0.000                           *</div><div>*                                                                               *</div><div>*                         atmospheric correction activated                      *</div><div>*                         --------------------------------                      *</div><div>Atmospheric correction...</div><div>Segmentation fault: 11</div><div><br></div><div><br></div><div>I've tried with 7.0.2 and 6.0.4 versions, both end up in the same error.</div><div><br></div><div>If I try to run it from a python script I a bit more information:</div><div><br></div><div><div>grass.run_command('i.atcorr', input=ast_band, elevation='srtm_xingu_3sec', parameters=fname, output=ast_band+'_atcorr_6s', verbose=True)</div><div>WARNING: Unknown aerosol model!</div><div>WARNING: Unsupported iwave value: 809775095</div><div> wavelength  less  than  0.25  micron: </div><div> let's take s(l)=s(0.25)</div><div><br></div><div><br></div><div><br></div><div>* ****************************** 6s version 4.2b ****************************** *</div><div>*                        geometrical conditions identity                        *</div><div>*                        -------------------------------                        *</div><div>*                        ASTER    observation                                   *</div><div>*                                                                               *</div><div>*    month: 6 day: 22                                                          *</div><div>*    solar zenith angle:   34.65 deg  solar azimuthal angle:       38.18 deg   *</div><div>*    view zenith angle:     0.00 deg  view azimuthal angle:         0.00 deg   *</div><div>*    scattering angle:    145.35 deg  azimuthal angle difference:  38.18 deg   *</div><div>*                                                                               *</div><div>*                        atmospheric model description                          *</div><div>*                        -----------------------------                          *</div><div>*            atmospheric model identity :                                       *</div><div>*                tropical            (uh2o=4.12g/cm2,uo3=.247cm-atm)            *</div><div>*                                                                               *</div><div>*            aerosols type identity :                                           *</div><div>*                 user defined aerosols model                                   *</div><div>*                                                                               *</div><div>*            optical condition identity :                                       *</div><div>*                 visibility :   -0.10 km  opt. thick. 550nm :   0.0000       *</div><div>*                                                                               *</div><div>*                        spectral condition                                     *</div><div>*                        ------------------                                     *</div><div>*           Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>  File "/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/script/core.py", line 394, in run_command</div><div>    return handle_errors(returncode, returncode, args, kwargs)</div><div>  File "/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/script/core.py", line 312, in handle_errors</div><div>    returncode=returncode)</div><div>  File "/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/exceptions/__init__.py", line 68, in __init__</div><div>    msg = _("Module run %s %s ended with error") % (module, code)</div><div>TypeError: 'str' object is not callable</div></div><div><br></div><div><br></div><div>any help is appreciated</div><span><font color="#888888"><div><br></div><div>Carlos</div>-- <br><div><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</font></span></div>
<br></div></div>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>