Commandline interaction with the software

Post Reply
milyra
Posts: 3
Joined: Tue Apr 14, 2015 6:54 am
Location: Denmark

Commandline interaction with the software

Post by milyra »

A feature that I could see a lot of benefit in is the ability to interact with the software through a commandline feature. Combining a pre-generated settings-file with a different input file, and being able to do this through a user-generated batch- / bash-file would help immensely when processing a timeseries of Landsat-8 scenes.
Inspiration for the approach could be taken from the MODIS Reprojection Tool, although the implementation would have to be very different due to the reliance on IDL in ACOLITE.
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: Commandline interaction with the software

Post by quinten »

Hi Mikkel

You can currently run a number of images using the same settings file, and I think it should work fine from a user generated script. Or did you have something else in mind?

Quinten

From the processing options pdf (see releases):
An ACOLITE settings file needs to be generated in the GUI, and the images need to be given as
a comma separated string. The examples below use the included IDL runtime, but it is also
possible to use your own IDL installation.

Linux:
open a terminal
cd /path/to/acolite/
idl82/bin/idl -rt=acolite.sav -args image=/path/to/image1,/path/to/image2
settings=acolite_settings_file

Windows:
Select Start > Run…
enter cmd and press return
cd /path/to/acolite/
bin/bin.x86/idlrt.exe acolite.sav –args image=/path/to/image1,/path/to/image2
settings=acolite_settings_file
Note that the Windows version does not output any messages to the command line.
milyra
Posts: 3
Joined: Tue Apr 14, 2015 6:54 am
Location: Denmark

Re: Commandline interaction with the software

Post by milyra »

Yes. Exactly what I was looking for. Hadn't thought to look under the change log in the processing options for the description. Thank you.
Kat
Posts: 1
Joined: Thu Jul 02, 2015 7:09 am

Re: Commandline interaction with the software

Post by Kat »

Hi,

I am trying to run the command:


kat@pc-kb:~/Documents/acolite_linux_beta$ idl84/bin/idl -rt=winam_gulf -args image=list_winamgulf

But I get an error, I am probably missing something, hope someone can help out.

Cheers,

KAt
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: Commandline interaction with the software

Post by quinten »

Hey Kat

Make sure you call the ACOLITE runtime, specified by the -rt option. In fact if you execute this, it will just launch ACOLITE in a similar way to using the launch script or executable.

Code: Select all

idl84/bin/idl -rt=acolite.sav
The -args option specifies the arguments that are passed to the runtime. In this case 'settings' and 'image', for the path to the settings file and the image(s) or the list of images (txt) you want to process. Note that if you provide an image list, you need to include the full path to the images in the text file. The path to the settings file has to be the full path or relative to the ACOLITE directory.

Code: Select all

idl84/bin/idl -rt=acolite.sav -args settings=winam_gulf image=list_winamgulf
Hope this clarifies things!

Quinten
Post Reply