How to run ACOLITE in batch mode?

Post Reply
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

How to run ACOLITE in batch mode?

Post by quinten »

You can run ACOLITE in batch mode using the following commands:
Linux (open a terminal and cd to the ACOLITE directory)
idl84/bin/idl -rt=acolite.sav -args settings=acolite_settings_file image=imagelist
Windows (Select Start > Run…, enter cmd and press return, cd to the ACOLITE directory)
32 bit: /path/to/acolite/idl84/bin/bin.x86/idlrt.exe -vm=acolite.sav -args settings=acolite_settings_file image=imagelist
64 bit: /path/to/acolite/idl84/bin/bin.x86_64/idlrt.exe -vm=acolite.sav -args settings=acolite_settings_file image=imagelist
In these examples, acolite_settings_file is an ACOLITE configuration file, specifying processing settings, output directory, region extent, etc., imagelist can be a comma-separated list of images with the full path (e.g. /path/to/image1,/path/to/image2,/path/to/image3/) or a text file containing a list of full paths to the images (newline separated).

For Mac users, the batch mode is probably similar to the Linux option above (unconfirmed).


post edited on 2016-04-25: changed the Linux example to use the idl script for setting up the proper environment
post edited on 2016-06-01: changed the Windows example include the -vm= flag
post edited on 2016-06-03: changed the Windows example include the -args flag
jhanafin
Posts: 4
Joined: Thu Apr 21, 2016 1:24 pm

Re: How to run ACOLITE in batch mode?

Post by jhanafin »

Hi Quentin,

thanks for this software, it's really helping us to get a handle on Landsat water processing. Can you please explain what should be in the 'imagelist' in order to run the batch command? When you say a list of images, do you mean a list of files containing bands for one Landsat tile, e.g. PATH/LC82060232015255LGN00_B1.TIF, PATH/LC82060232015255LGN00_B2.TIF, etc?

Thanks,

Jenny
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: How to run ACOLITE in batch mode?

Post by quinten »

Hi Jenny

The 'imagelist' should contain a list of paths to the extracted scene directory or to the MTL files. There is no need to list individual bands in each scene.

For example, if I want to process two scenes LC81990242014075LGN00 and LC81990242014091LGN00, both stored in a given directory, say /home/quinten/Data/L8/199/024/ the ACOLITE command is:
idl84/bin/idl -rt=acolite.sav -args settings=acolite_settings_file image=/home/quinten/Data/L8/199/024/LC81990242014075LGN00,/home/quinten/Data/L8/199/024/LC81990242014091LGN00
Alternatively these path to the scenes can go in a plain text file with each scene on a new line, e.g. /home/quinten/Data/scenes.txt The ACOLITE command then is:
idl84/bin/idl -rt=acolite.sav -args settings=acolite_settings_file image=/home/quinten/scenes.txt
I hope this helps!

Quinten

post edited on 2016-04-25: changed the Linux example to use the idl script for setting up the proper environment
RodneyF
Posts: 1
Joined: Wed Jun 01, 2016 6:29 pm

Re: How to run ACOLITE in batch mode?

Post by RodneyF »

hi Quintin,
the Windows 32 and 64 comand lines require "-args" inserted in order to work.
Rodney
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: How to run ACOLITE in batch mode?

Post by quinten »

Thanks Rodney!

I have changed the example.

Quinten
adogliotti
Posts: 11
Joined: Tue Apr 12, 2016 4:04 pm

Re: How to run ACOLITE in batch mode?

Post by adogliotti »

Hi Quinten,

I'm trying to process in bacth mode in linux, but I get this error:

~/acolite_linux/idl84/bin$ bash idl -rt=/home/tele/acolite_linux/acolite.sav -args settings=/home/tele/S2/S2_Mancha_Rhow_subset2.cfg image=/home/tele/S2/list.txt

Unable to access idl. You will have to
define the IDL_DIR environment variable to point at the main
IDL directory before it will work.

Thanks for your help!

Ana
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: How to run ACOLITE in batch mode?

Post by quinten »

Hi Ana

The "idl" in the idl84/bin directory is actually a script that will set up the IDL runtime environment for you. You should run it from the acolite_linux directory instead of the idl84/bin directory. To take your example, from within the acolite_linux directory:

Code: Select all

 ~/acolite_linux$ /idl84/bin/idl -rt=acolite.sav -args settings=/home/tele/S2/S2_Mancha_Rhow_subset2.cfg image=/home/tele/S2/list.txt
Hope this helps!

Quinten
benloveday
Posts: 1
Joined: Thu Nov 30, 2017 8:28 pm
Location: Plymouth
Contact:

Re: How to run ACOLITE in batch mode?

Post by benloveday »

Hi Quinten,

Thanks for the great software. I have set up a quick batch processing script on OSx, which runs successfully, but has two small issues:

1. Everytime I launch Acolite (GUI or batch), an 'ok' box pops up. I have to manually click this to get it to proceed, which is not ideal. Usual approaches like echo '\n' | $cmd etc. do not seem to alleviate the problem. Is there something wrong with my config, or do I need to check my environment settings somehow?

2. If, for testing, I only wanted to output corrected RGBs from S2, is it possible to set products to none?

Can you help me get over these final little hurdles?

Cheers,

Ben
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: How to run ACOLITE in batch mode?

Post by quinten »

Hi Ben

The pop-up is normal and is a side-effect of using the IDL runtime. Circumventing this pop-up is in violation of the runtime license so I cannot help you there. Please note that an open source Python version of ACOLITE is under development which will not have this issue. (I estimate a first version to be available early 2018.)

If you want just the RGB files you can clear the "Output parameters" box in the GUI, or leave the "products=" option empty in your settings file. (Maybe it is then also best if you disable smoothing options to speed things up.)

Quinten
Post Reply