<div dir="ltr">Dear Nikos. <div>After a long time I'm trying to reproduce a routine I have for doing intercallibratrion of DMSP 1992-2012 but for some reason It doesn't work to me. I think is because the problem between the region of the layers 30 arc sec should resolution be from 0.008333333300000 to 0.008333333333333, i.e. exactly 30 arc-seconds? and the computational region be the same ? I got stuck on how to set it to work... from the side of the region setting.</div><div>However in addition my routing also has a for loop which does not work ok as well.</div><div>I would appreciate a lot of you can give it a look and tell me how to make it work...</div><div>Thanks  a lot in advance</div><div>Kind regards,</div><div>Gabriel</div><div>#####-----------------------------------------------------------------------------------------</div><div># complete routine for intercalliration of DSMP/OLS light stable product<br><br>import grass.script as gscript<br>import os<br>import os,glob<br><br># get working directory<br>print os.getcwd()<br><br># change working directory where raster files are<br>os.chdir('C:\\Users\\Gabriel\\Documents\\grassdata\\lights')<br><br># see files in directory<br>ls<br><br># import all raster files to grass --- here is a kind of problem...???<br>for tif_file in glob.glob("*.tif"):<br>    new_rast = os.path.splitext(tif_file)[0]<br>    grass.run_command("r.in.gdal", flags="a", input=tif_file, output=new_rast)<br><br># get info of one of the imported raster<br><a href="http://r.info">r.info</a> map=F121996<br><br># run intercalliration algorithm<br>i.nightlights.intercalibration image=F101992,F101993,F101994,F121994,F121995,F121996,F121997,F121998,F121999,F141997,F141998,F141999,F142000,F142001,F142002,F142003,F152000,F152001,F152002,F152003,F152004,F152005,F152006,F152007,F162004,F162005,F162006,F162007,F162008,F162009,F182010,F182011,F182012,F182013 suffix=c model=elvidge2014 -t        <br>      <br># correct general region adjust to raster file --- here the region is exactly 30 arc for the raster as I could see.... <br>g.region raster=F121996<br><br># cerate a list of rasters in the mapset<br># rastlist=grass.read_command("g.list",type="rast").split()<br> rasters = grass.read_command('g.list', type='raster').splitlines()<br> <br># change working directory<br>os.chdir('C:\\Users\\Gabriel\\Desktop\\out')<br> <br># save rasters in mapset to file<br>for raster in rasters:<br>    grass.run_command('r.out.gdal', input=raster, output=raster + '.tiff', format='GTiff')</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 22, 2018 at 10:06 AM Gabriel Cotlier <<a href="mailto:gabiklm01@gmail.com">gabiklm01@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Nikos,</div><div><br></div><div>Thanks a lot for your answer and the orientation. <br></div><div>The information and the link are very useful.</div><div>Kind regards,</div><div>Gabriel<br></div><div> <br> </div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 22, 2018 at 5:19 AM Nikos Alexandris <<a href="mailto:nik@nikosalexandris.net" target="_blank">nik@nikosalexandris.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">* Gabriel Cotlier <<a href="mailto:gabiklm01@gmail.com" target="_blank">gabiklm01@gmail.com</a>> [2018-08-21 12:00:24 -0300]:<br>
<br>
>Dear Nikos and GRASS users,<br>
><br>
>I would like to ask if nonetheless the effect due to "stray light" the<br>
>*i.landsat8.swlst* code for split window is still applicable to Landsat 8<br>
>data and whether these error is specially visible on water bodies? and<br>
>whether band 10 is better than band 11 in terms of correction processing<br>
>for Level -1  data products?<br>
><br>
>Thanks a lot.<br>
><br>
>Kind regards,<br>
>Gabriel<br>
<br>
Dear Gabriel,<br>
<br>
for details and references, refer to<br>
<br>
<a href="https://landsat.gsfc.nasa.gov/landsat-8-thermal-data-ghost-free-after-stray-light-exorcism/" rel="noreferrer" target="_blank">https://landsat.gsfc.nasa.gov/landsat-8-thermal-data-ghost-free-after-stray-light-exorcism/</a><br>
<br>
Make sure you use the newest Level-1 Collection 1 Landsat 8 products.<br>
<br>
I use `i.landsat8.swlst` and plan to improve it further.<br>
<br>
However, whether to prefer a Split-Window based approach, or another<br>
Single-Channel one, depends on what you want to do. Think of spatial<br>
extent and coverage of various land (cover) types, temporal extent<br>
and more.<br>
<br>
Thermal remote sensing is hard(er) also because it's hard to get<br>
ground-truth data sets so as to validate LST estimations.<br>
<br>
Nikos<br>
</blockquote></div>
</blockquote></div>