Hi dev@,
I am working on a PGE which will essentially execute a (Python) command
line tool but i am struggling with definition of parameters from the input
data product to the PGE XML definition. Specifically I am not sure of how
to map the product name to an input parameter for the command line tool
invocation.
The following PGE configuration snippet shows this

...
<pgeConfig>

  <exe dir="[JobDir]" shell="/bin/bash">
    <cmd>pycoal-mineral ${flag#1} ${parameter#1} ${flag#2} ${parameter#2}
${flag#3} ${parameter#3} ...</cmd>
  </exe>

In the above example ${flag#1} would be something like '-i' and the
parameter value should be the name of a data product which has already been
catalogued and archived to a success directory during a previous data
acquisition task.

The full CLI command execution would ultimately look something like the
following

pycoal-mineral \
  --image /usr/local/pycoal_data/
avng.jpl.nasa.gov/AVNG_2015_data_distribution/L2/ang20150420t182050_rfl_v1e/ang20150420t182050_corr_v1e_img.hdr
\
  --slib /usr/local/pycoal/pycoal/tests/s07_AV95_envi.hdr \
  --rgb_filename ang20150420t182050_corr_v1e_img_rgb.hdr
  --classified_filename ang20150420t182050_corr_v1e_img_mineral.hdr
  --algorithm SAM

I need to

   1. automatically infer the 1st parameter value for '--image' from the
   input data file which has been processed and archived to a specific
   directory
   2. infer the 3rd parameter value for '--rgb_filename' from the 1st
   parameter and edit it slightly, and
   3. infer the 4th parameter value for '--classified_filename' from the
   1st parameter and edit it slightly

Thanks for any help folks I really appreciate it.
Lewis

-- 
http://home.apache.org/~lewismc/
http://people.apache.org/keys/committer/lewismc

Reply via email to