Presentation is loading. Please wait.

Presentation is loading. Please wait.

CoastColour BEAM Workshop Lisbon, October 21, 2011.

Similar presentations


Presentation on theme: "CoastColour BEAM Workshop Lisbon, October 21, 2011."— Presentation transcript:

1 CoastColour BEAM Workshop Lisbon, October 21, 2011

2 1. Use BEAM’s command-line tools o from a command-line shell o from shell scripts o from Python, IDL, MATLAB,... using dedicated system 2. Use the BEAM Java API to call BEAM functions o from your Java program o from your Phython program Sept. 27, 2011WaterRadiance, Progress Meeting 6, 2 Options

3  Have a look into the ${BEAM-HOME}/bin directory  gpt –Used to execute various “BEAM operators” and chains of operators.  pconvert – Used to convert product files into other data and images formats (will become a gpt opertaor)  binning  meris-smac – Envisat MERIS smile correction  meris-cloud – Envisat MERIS cloud screening  flhmci – Envisat MERIS/AATSR FLH/MCI processors  aatsr-sst – ATSR/AATSR SST processor  mosaic – deprecated, use gpt Reproject  mapproj – deprecated, use gpt Mosaic Sept. 27, 2011WaterRadiance, Progress Meeting 6, 3 BEAM Command-Line Tools

4  Most important BEAM batch-mode tool  Other command-line tools will become BEAM operators in the future  Usage  gpt | [options] [...]  Which operators are available?  gpt –h  Note that list of operators may vary depending on the installed BEAM plug-ins Sept. 27, 2011WaterRadiance, Progress Meeting 6, 4 BEAM gpt

5  Refer to gpt documentation in BEAM VISAT help  Operator index lists only standard operators Sept. 27, 2011WaterRadiance, Progress Meeting 6, 5 BEAM gpt Operator Index

6  Many of the BEAM gpt operators and command- line tools have a counterpart in the VISAT tools menu  You can save a parameter file from an operator’s GUI in VISAT and use it with BEAM gpt on the command-line Sept. 27, 2011WaterRadiance, Progress Meeting 6, 6 BEAM gpt Parameterisation

7 input-path='~/eodata/MER_RR__1P.N1' gpt.sh Reproject -Pcrs=AUTO: f NetCDF $input-path Sept. 27, 2011WaterRadiance, Progress Meeting 6, 7 Calling BEAM gpt from Shell Scripts

8 Sept. 27, 2011WaterRadiance, Progress Meeting 6, 8 Calling BEAM gpt from Python import subprocess gpt = '~/software/beam-4.9/bin/gpt.sh' operator = 'Reproject' parameters = '-Pcrs=AUTO: f NetCDF' input_path = '~/eodata/MER_RR__1P.N1' process = subprocess.Popen(gpt + ' ' + operator \ + ' ' + parameters + ' '+ input_path,\ shell=True, \ bufsize=1,\ stdout=subprocess.PIPE, \ stderr=subprocess.STDOUT) trace = open('gpt.stdout', 'w') for line in process.stdout: trace.write(line) trace.flush() trace.close() process.stdout.close() code = process.wait()

9  Advantages:  no intermediate files written, no I/O overhead  reusability of processing chains  simple and comprehensive operator configuration  reusability of operator configurations  Usage example  gpt iop-graph.xml Sept. 27, 2011WaterRadiance, Progress Meeting 6, 9 Processing chains: Using gpt Graphs

10  Single operator = single node: Sept. 27, 2011WaterRadiance, Progress Meeting 6, 10 BEAM gpt Graph XML Example 1

11  Two operator chain: (1) IOP, (2) subset Sept. 27, 2011WaterRadiance, Progress Meeting 6, 11 BEAM gpt Graph XML Example 2

12  Using gpt  gpt –h  In BEAM VISAT Help Topics: Graph Processing Framework (GPF)  Setting up a gpt processing chain:  wiki/display/BEAM/Creating+a+GPF+Graph Sept. 27, 2011WaterRadiance, Progress Meeting 6, 12 Getting Help – Command-line

13  BEAM Java API Documentation:  consult.de/beam/doc/apidocs/index.html  BEAM home page / downloads  BEAM Java Programming:  wiki/display/BEAM/Development Sept. 27, 2011WaterRadiance, Progress Meeting 6, 13 Getting Help - Java

14  Call the BEAM API from C-Python with JPipe:   Use the BEAM API with Jython:  Sept. 27, 2011WaterRadiance, Progress Meeting 6, 14 Integrating BEAM code in Python


Download ppt "CoastColour BEAM Workshop Lisbon, October 21, 2011."

Similar presentations


Ads by Google