eval "$(pixi shell-hook --change-ps1 false)"7 Unmixing
7.1 Introduction
The following sections demonstrate that the HEATWISE HySUPP unmixing Software follows the OGC Best Practice for Earth Observation Application Package.
The order of demonstration is deliberately different from that given in the best practice document. This is done to make the demonstration easy to follow and group requirements that can be shown together. An effort is made to keep the requirements in order as much as possible to make it easy to find a specific requirement.
The demonstration proceeds in the following steps:
- Execute the software as docker container and as CWL document (the EOAP)
- Show that STAC inputs and outputs are handled by the application as required
- Show that the CWL document is structured as required
- Show that STAC inputs and outputs are declared in the CWL as required
After each step, the requirements shown are listed.
Chapter 2 contains an overview of all requirements in order and how they are demonstrated in this document. It furthermore shows all utility scripts used in this demonstration. For brevity, the content of utility scripts is only shown in the requirements overview and not in each demonstration.
7.2 Preparation
Activate the pixi environment to make validation tools and scripts available.
Set environment variables to software, cwl documents, inputs and outputs.
set -o pipefail
set -x
SOFTWARE_ROOT="$PIXI_PROJECT_ROOT"/software/heatwise-hysupp-unmixing
CWL_PATH="$PIXI_PROJECT_ROOT"/application-packages/heatwise_hysupp_unmixing.cwl
INPUT_PATH="$PIXI_PROJECT_ROOT"/inputs/unmixing
DOCKER_IMAGE_ID=ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0
OUTPUT_PATH="$PIXI_PROJECT_ROOT"/outputs/unmixing
ls -ltrAh --color=never "$SOFTWARE_ROOT"
set +x+ SOFTWARE_ROOT=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/software/heatwise-hysupp-unmixing
+ CWL_PATH=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise_hysupp_unmixing.cwl
+ INPUT_PATH=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing
+ DOCKER_IMAGE_ID=ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0
+ OUTPUT_PATH=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing
+ ls --color=auto -ltrAh --color=never /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/software/heatwise-hysupp-unmixing
ls: cannot access '/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/software/heatwise-hysupp-unmixing': No such file or directory
+ set +x
7.3 Running the software
The first set of requirements is concerned with how the software is executed. It shall be
- Runnable as a non-interactive script
- Bundled in (Docker) container
- Executable as a CWL Workflow containing at least one CWL CommandLineTool
7.3.1 Running as a docker container
We can run the (dockerized) software directly, without using the CWL machinery with docker run:
mkdir -p "$OUTPUT_PATH"
docker run --rm \
-v $INPUT_PATH/data:/data \
-v $OUTPUT_PATH:/results \
--user "$(id -u):$(id -g)" \
$DOCKER_IMAGE_ID \
processor.py \
--input-image /data/Sepolia/Sepolia_CHIME_Thermopolis_v2_COG.tif \
--endmembers /data/Sepolia/endmembers_sepolia.xlsx \
--wavelengths-txt /data/Sepolia/Sepolia_CHIME_Thermopolis_v2_wavelengths.txt \
--output-dir /results/sepolia \
--output-prefix Sepolia_FCLS \
--scale-factor 1.0 \
--min-abundance 0.0 \
--log-every 1000 \
|| { FAIL_REQ_1=1; FAIL_REQ_2=1; }[INFO] Reading input raster...
[INFO] Reading endmembers...
[INFO] Interpolating endmembers to image wavelength grid...
[INFO] Original image bands: 250
[INFO] Bands used for FCLS: 124
[INFO] Number of endmembers/classes: 5
[INFO] Converting image cube to spectral matrix...
[INFO] Valid pixels for FCLS: 4902 / 9570
[INFO] Running FCLS...
[INFO] Writing abundance stack...
[INFO] Writing classification map...
[OK] Wrote abundance stack: /results/sepolia/Sepolia_FCLS_abundance_stack_COG.tif
[OK] Wrote classification map: /results/sepolia/Sepolia_FCLS_classification_map_COG.tif
[OK] Wrote class names: /results/sepolia/Sepolia_FCLS_class_names.json
[OK] Wrote wavelengths used: /results/sepolia/Sepolia_FCLS_wavelengths_used_um.txt
[OK] Wrote metadata: /results/sepolia/Sepolia_FCLS_run_metadata.json
[OK] Wrote STAC: /results/sepolia/catalog.json
The image should not only be available locally, but also in a container registry.
check-container-registry.sh $DOCKER_IMAGE_ID || FAIL_REQ_3=1SUCCESS: Image ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0 found on registry
7.3.1.1 Requirements Validated
req/app/cmd-line (Requirement 1)
The Application SHALL be a non-interactive executable as a command-line application.
req/app/container (Requirement 2)
The environment, libraries, binaries, executable and configuration files necessary to execute the Application SHALL be bundled in a container image.
req/app/registry (Requirement 3)
The Application container image SHALL be accessible in a container registry.
7.3.2 Running as an EOAP
First, we validate that the CWL document is valid.
cwltool --disable-color --validate "$CWL_PATH" | catINFO /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/.pixi/envs/dev/bin/cwltool 3.2.20260413085819
INFO Resolved '/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise_hysupp_unmixing.cwl' to 'file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise_hysupp_unmixing.cwl'
/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise_hysupp_unmixing.cwl is valid CWL.
The CWL should contain a Workflow and at least one CommandLineTool object. We inspect the classes in the CWL graph to make sure.
show-cwl-graph-classes.sh "$CWL_PATH"class: Workflow
id: main
---
class: CommandLineTool
id: hysupp_unmixing_processor
---
class: CommandLineTool
id: extract_stac_catalog
The EOAP can be executed from its CWL description with cwltool.
cwltool \
--disable-color \
--outdir "$OUTPUT_PATH/cwlruns" \
$CWL_PATH \
--input_catalog $INPUT_PATH/data/Sepolia \
--endmembers $INPUT_PATH/data/Sepolia/endmembers_sepolia.xlsx \
--wavelengths_txt $INPUT_PATH/data/Sepolia/Sepolia_CHIME_Thermopolis_v2_wavelengths.txt \
--output_prefix Sepolia_FCLS \
|| FAIL_REQ_7=1INFO /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/.pixi/envs/dev/bin/cwltool 3.2.20260413085819
INFO Resolved '/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise_hysupp_unmixing.cwl' to 'file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise_hysupp_unmixing.cwl'
INFO [workflow ] start
INFO [workflow ] starting step extract_input_image
INFO [step extract_input_image] start
INFO [job extract_input_image] /tmp/w9fn5tfu$ docker \
run \
-i \
--mount=type=bind,source=/tmp/w9fn5tfu,target=/ORcKxy \
--mount=type=bind,source=/tmp/c9qotu_1,target=/tmp \
--mount=type=bind,source=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/data/Sepolia,target=/var/lib/cwl/stg13183bc1-5c84-4024-b067-6cdeab307945/Sepolia,readonly \
--workdir=/ORcKxy \
--read-only=true \
--net=none \
--user=1001:1001 \
--rm \
--cidfile=/tmp/2pi99npz/20261127104429-888882.cid \
--env=TMPDIR=/tmp \
--env=HOME=/ORcKxy \
ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0 \
/app/extract_path_from_stac.py \
--input-catalog \
/var/lib/cwl/stg13183bc1-5c84-4024-b067-6cdeab307945/Sepolia
INFO [job extract_input_image] completed success
INFO [step extract_input_image] completed success
INFO [workflow ] starting step processor
INFO [step processor] start
INFO [job processor] /tmp/686_aqw8$ docker \
run \
-i \
--mount=type=bind,source=/tmp/686_aqw8,target=/ORcKxy \
--mount=type=bind,source=/tmp/5efbarp1,target=/tmp \
--mount=type=bind,source=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/data/Sepolia/endmembers_sepolia.xlsx,target=/var/lib/cwl/stg112f41cd-3bf9-462b-97b9-3e27b0fd989d/endmembers_sepolia.xlsx,readonly \
--mount=type=bind,source=/tmp/w9fn5tfu/input_file.tif,target=/var/lib/cwl/stg8f487ac2-a59f-4b19-8812-907e8122b8ca/input_file.tif,readonly \
--mount=type=bind,source=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/data/Sepolia/Sepolia_CHIME_Thermopolis_v2_wavelengths.txt,target=/var/lib/cwl/stgbf4d8f0a-6336-4462-9b4c-72d5ca4e078a/Sepolia_CHIME_Thermopolis_v2_wavelengths.txt,readonly \
--workdir=/ORcKxy \
--read-only=true \
--net=none \
--user=1001:1001 \
--rm \
--cidfile=/tmp/d8n85on2/20261127104430-903941.cid \
--env=TMPDIR=/tmp \
--env=HOME=/ORcKxy \
ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0 \
/app/processor.py \
--input-image \
/var/lib/cwl/stg8f487ac2-a59f-4b19-8812-907e8122b8ca/input_file.tif \
--endmembers \
/var/lib/cwl/stg112f41cd-3bf9-462b-97b9-3e27b0fd989d/endmembers_sepolia.xlsx \
--wavelengths-txt \
/var/lib/cwl/stgbf4d8f0a-6336-4462-9b4c-72d5ca4e078a/Sepolia_CHIME_Thermopolis_v2_wavelengths.txt \
--output-dir \
. \
--output-prefix \
Sepolia_FCLS \
--scale-factor \
1.0 \
--min-abundance \
0.0 \
--maxiter \
200 \
--ftol \
0 \
--log-every \
10000
[INFO] Reading input raster...
[INFO] Reading endmembers...
[INFO] Interpolating endmembers to image wavelength grid...
[INFO] Original image bands: 250
[INFO] Bands used for FCLS: 124
[INFO] Number of endmembers/classes: 5
[INFO] Converting image cube to spectral matrix...
[INFO] Valid pixels for FCLS: 4902 / 9570
[INFO] Running FCLS...
[INFO] Writing abundance stack...
[INFO] Writing classification map...
[OK] Wrote abundance stack: Sepolia_FCLS_abundance_stack_COG.tif
[OK] Wrote classification map: Sepolia_FCLS_classification_map_COG.tif
[OK] Wrote class names: Sepolia_FCLS_class_names.json
[OK] Wrote wavelengths used: Sepolia_FCLS_wavelengths_used_um.txt
[OK] Wrote metadata: Sepolia_FCLS_run_metadata.json
[OK] Wrote STAC: catalog.json
INFO [job processor] Max memory used: 1118MiB
INFO [job processor] completed success
INFO [step processor] completed success
INFO [workflow ] completed success
{
"output": {
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8",
"basename": "686_aqw8",
"class": "Directory",
"listing": [
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_wavelengths_used_um.txt",
"basename": "Sepolia_FCLS_wavelengths_used_um.txt",
"size": 1130,
"checksum": "sha1$17d966e5e27e80b863bab1191beea0efc3139c17",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_wavelengths_used_um.txt"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_classification_map_COG.tif",
"basename": "Sepolia_FCLS_classification_map_COG.tif",
"size": 3508,
"checksum": "sha1$933b3928cc3a1e61232f23b65263212e89663919",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_classification_map_COG.tif"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_abundance_stack_COG.tif",
"basename": "Sepolia_FCLS_abundance_stack_COG.tif",
"size": 93438,
"checksum": "sha1$bdfe68d4e9ea1c462539bd205270125090d1ddb5",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_abundance_stack_COG.tif"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/hysupp_unmixing.json",
"basename": "hysupp_unmixing.json",
"size": 5210,
"checksum": "sha1$7c35665bbcb24d2e4ea838237bb500692a766c9b",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/hysupp_unmixing.json"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_run_metadata.json",
"basename": "Sepolia_FCLS_run_metadata.json",
"size": 1287,
"checksum": "sha1$f00ed5660fef0a4fb0a7ecba7410eb6f92dc9c4d",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_run_metadata.json"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/catalog.json",
"basename": "catalog.json",
"size": 412,
"checksum": "sha1$b106c2d571be6e123caad3a40f05c83f1998f249",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/catalog.json"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_class_names.json",
"basename": "Sepolia_FCLS_class_names.json",
"size": 320,
"checksum": "sha1$02c3aac8cf2298dcd2c8f13de63a6cd01099b237",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/Sepolia_FCLS_class_names.json"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8"
}
}INFO Final process status is success
Cwltool creates a new output directory with a random name when it is run. We save the last run in a variable to access it later.
CWLRUN_PATH=$(find-newest-directory-entry.sh "$OUTPUT_PATH/cwlruns")
echo "Path to last cwl run: $CWLRUN_PATH"Path to last cwl run: /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8
7.3.2.1 Requirements Validated
req/app-pck/cwl (Requirement 7)
The Application Package SHALL be a valid CWL document with a “Workflow” class and one or more “CommandLineTool” classes.
7.3.2.2 EOAP Output
tree -n $CWLRUN_PATH || :/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8
├── Sepolia_FCLS_abundance_stack_COG.tif
├── Sepolia_FCLS_class_names.json
├── Sepolia_FCLS_classification_map_COG.tif
├── Sepolia_FCLS_run_metadata.json
├── Sepolia_FCLS_wavelengths_used_um.txt
├── catalog.json
└── hysupp_unmixing.json
1 directory, 7 files
python -c "import matplotlib.pyplot as plt; \
import xarray as xr; \
import rioxarray as rio; \
ds=rio.open_rasterio(\"$CWLRUN_PATH/Sepolia_FCLS_classification_map_COG.tif\"); \
fig, ax=plt.subplots(); \
ds.plot(ax=ax, cmap='Set1_r', add_colorbar=False); \
ax.set(aspect=1, xticks=[], yticks=[], title='', xlabel='', ylabel=''); \
fig.savefig('classification_map.png'); \
ds.close()" || :
7.4 STAC input / output
7.4.1 Inputs
The EO Products of the input are provided as directories with a catalog.json describing the products each:
ls -lAhX --color=never $INPUT_PATH/*-rw-r--r-- 1 runner runner 827 Nov 27 10:37 /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/Dockerfile
-rw-r--r-- 1 runner runner 6.1K Nov 27 10:37 /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/heatwise_hysupp_unmixing.cwl
-rw-r--r-- 1 runner runner 7.8K Nov 27 10:37 /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/README.md
-rw-r--r-- 1 runner runner 1.4K Nov 27 10:37 /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/extract_path_from_stac.py
-rw-r--r-- 1 runner runner 24K Nov 27 10:37 /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/processor.py
-rw-r--r-- 1 runner runner 67 Nov 27 10:37 /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/requirements.txt
/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/unmixing/data:
total 4.0K
drwxr-xr-x 2 runner runner 4.0K Nov 27 10:37 Sepolia
These same inputs are classed as Directory in the workflow:
extract-directory-inputs-from.sh Workflow "$CWL_PATH" || FAIL_REQ_4=1Running
inputs_with_directory_type:
- id: input_catalog
type: Directory
label: input catalog
doc: Directory with stac catalog referencing input CHIME-mimicked hyperspectral
GeoTIFF.
7.4.2 Outputs
The output contains a single catalog.json and item, describing the output. Using the recursive validation, both the catalog and item are confirmed to be valid STAC.
(stac-validator validate --recursive $CWLRUN_PATH/catalog.json | cat) || FAIL_REQ_5=1
Thanks for using STAC version 1.1.0!
[
{
"version": "1.1.0",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/catalog.json",
"schema": [
"https://schemas.stacspec.org/v1.1.0/catalog-spec/json-schema/catalog.json"
],
"valid_stac": true,
"asset_type": "CATALOG",
"validation_method": "recursive",
"validator_engine": "jsonschema"
},
{
"version": "1.1.0",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/unmixing/cwlruns/686_aqw8/./hysupp_unmixing.json",
"schema": [
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/classification/v2.0.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json"
],
"valid_stac": true,
"asset_type": "ITEM",
"validation_method": "recursive",
"validator_engine": "jsonschema"
}
]
-- Recursive Validation Summary:
Stac objects passed: 2/2 (100.0%)
Breakdown by type:
Catalog: 1/1 (100.0%)
Item: 1/1 (100.0%)
Validation completed in 402.87ms
The EOAP best practice mandates that the item contains at least geometry, bbox and datetime keys.
extract-output-keys-from-stac-item.sh $CWLRUN_PATH/hysupp_unmixing.json || FAIL_REQ_6=1geometry:
type: Polygon
coordinates: '[...truncated...]'
bbox:
- 736964.0
- 4207680.0
- 739574.0
- 4210980.0
properties:
datetime: '2026-11-27T10:45:00Z'
start_datetime: null
end_datetime: null
Required keys present: true
7.4.3 Requirements Validated
req/app/stac-input (Requirement 4)
An Application input argument that requires staged EO product files SHALL be defined as an argument that points to a folder where a STAC Catalog, named catalog.json, contains a list of one or more STAC Items and associated STAC Assets referencing the files.
req/app/stac-out (Requirement 5)
An Application that creates EO product files to be stage-out SHALL generate a valid STAC Catalog, named catalog.json, and include the STAC Item(s) and corresponding STAC Assets pointing to the results of the processing.
rec/app/stac-out-metadata (Requirement 6)
The STAC Catalog created by the Application SHALL include metadata elements for each STAC Item with at least their spatial (geometry, box) and temporal (datetime) properties.
7.5 CWL
The fields id, baseCommand, inputs, requirements should be present in the CommandLineTool. One of the requirements should be DockerRequirement.
check-commandlinetool-fields.sh "$CWL_PATH" || FAIL_REQ_8=1id: hysupp_unmixing_processor
baseCommand:
- /app/processor.py
requirements:
DockerRequirement:
dockerPull: ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0
InlineJavascriptRequirement: {}
---
id: extract_stac_catalog
baseCommand:
- /app/extract_path_from_stac.py
requirements:
DockerRequirement:
dockerPull: ghcr.io/esa-heatwise/heatwise-hysupp-unmixing:v1.0.0
Required keys present: true
The fields id, label, and doc should be present in the Workflow.
check-workflow-fields.sh "$CWL_PATH" || FAIL_REQ_9=1id: main
label: HEATWISE HySUPP Unmixing Workflow
doc: 'EOAP-oriented supervised FCLS unmixing processor for CHIME-mimicked
hyperspectral products.
'
Required keys present: true
Each input of the Workflow should have fields id, label, and doc
check-workflow-input-fields.sh $CWL_PATH || FAIL_REQ_10=1inputs:
- id: 0
label: input catalog
doc: Directory with stac catalog referencing input CHIME-mimicked hyperspectral
GeoTIFF.
- id: 1
label: endmembers
doc: Endmember spectral library in CSV or XLSX format.
- id: 2
label: wavenlenghts_txt
doc: Optional wavelength text file for the input image.
- id: 3
label: output_dir
doc: Output directory inside the CWL working directory.
- id: 4
label: output_prefix
doc: Prefix used for output filenames.
- id: 5
label: input_nodata
doc: Optional input nodata override.
- id: 6
label: scale_factor
doc: Multiplicative scale factor applied to the input image.
- id: 7
label: min_abundance
doc: Minimum abundance required for top-1 class assignment.
- id: 8
label: maxiter
doc: Maximum number of FCLS iterations per pixel.
- id: 9
label: ftol
doc: FCLS numerical tolerance.
- id: 10
label: log_every
doc: Print FCLS progress every N pixels. Use 0 to disable.
The CWL document should contain a version:
check-version.sh $CWL_PATH || FAIL_REQ_11=1s:version: 1.0.0
https://schema.org/version: null
Found version: true
7.5.1 Requirements Validated
req/app-pck/clt (Requirement 8)
The Application Package CWL CommandLineTool classes SHALL contain the following elements:
- Identifier (“id”)
- Command line name (“baseCommand”)
- Input parameters (“inputs”)
- Environment requirements (“requirements”)
- Docker information (“DockerRequirement”)
req/app-pck/wf (Requirement 9)
The Application Package CWL Workflow class SHALL contain the following elements:
- Identifier (“id”)
- Title (“label”)
- Abstract (“doc”)
req/app-pck/wf-inputs (Requirement 10)
The Application Package CWL Workflow class “inputs” fields SHALL contain the following elements:
- Identifier (“id”)
- Title (“label”)
- Abstract (“doc”)
req/app-pck/metadata (Requirement 11)
The Application Package CWL Workclass classes SHALL include additional metadata as defined in Table 1
Required in table 1: version
7.6 CWL STAC / IO
Inputs and outputs are staged in and out using STAC catalogs. Each input that is an “EO Product” like a vector or raster dataset is declared as type Directory and is described by a STAC catalog catalog.json and accompanying STAC item(s) placed in that directory.
Outputs are handled in much the same way, the application in the application package is responsible for generating a STAC catalog (also named catalog.json) and stage out all the contents of its working directory together with the STAC metadata describing the outputs.
7.6.1 Inputs
There are inputs of type directory in the CommandLineTool description.
extract-directory-inputs-from.sh CommandLineTool "$CWL_PATH" || FAIL_REQ_12=1Running
inputs_with_directory_type: []
---
inputs_with_directory_type:
- type: Directory
label: input catalog
doc: Directory with stac catalog referencing input CHIME-mimicked hyperspectral
GeoTIFF.
inputBinding:
prefix: --input-catalog
There are inputs of type directory in the Workflow description.
extract-directory-inputs-from.sh Workflow "$CWL_PATH" || FAIL_REQ_13=1Running
inputs_with_directory_type:
- id: input_catalog
type: Directory
label: input catalog
doc: Directory with stac catalog referencing input CHIME-mimicked hyperspectral
GeoTIFF.
7.6.2 Outputs
The CommandLineTool stages out all the contents of the working directory.
extract-commandlinetool-outputs.sh "$CWL_PATH" || FAIL_REQ_14=1output:
type: Directory
outputBinding:
glob: .
---
image_path:
type: File
doc: Path to the image referenced by the input STAC catalog
outputBinding:
glob: input_file.tif
Extracts all items from Working directory: true
7.6.3 Requirements validated
req/app-pck-stage-in/clt-stac (Requirement 12)
All input parameters of the CWL ComandLineTool that require the staging of EO products SHALL be of type Directory.
req/app-pck-stage-in/wf-stac (Requirement 13)
Input parameters of the CWL Workflow that require the staging of EO products SHALL be of type Directory.
req/app-pck-stage-out/output-stac (Requirement 14)
The outputs field of the CommandLineTool that requires the stage-out of EO products SHALL retrieve all the files produced in the working directory.
7.7 Summary
for i in {1..14}; do
var="FAIL_REQ_$i"
req=${var#FAIL_}
if [[ "${!var:-}" == "1" ]]; then
#echo "$req: FAILED"
printf '%s\t\033[31mFAILED\033[0m\n' "$req"
else
printf '%s\t\033[32mPASSED\033[0m\n' "$req"
fi
doneREQ_1 PASSED REQ_2 PASSED REQ_3 PASSED REQ_4 PASSED REQ_5 PASSED REQ_6 PASSED REQ_7 PASSED REQ_8 PASSED REQ_9 PASSED REQ_10 PASSED REQ_11 PASSED REQ_12 PASSED REQ_13 PASSED REQ_14 PASSED
The HySUPP unmixing software has been shown to be non-interactively executable from the command line and using a CWL runner (cwltool). Furthermore it follows the CWL structure and mandatory fields prescribed by the OGC Best Practice for Earth Observation Application Package (EOAP). Inputs and outputs are processed as CWL Directories and valid STAC metadata is generated for the output. It may therefore be concluded that the software behaves as expected by the EOAP best practice in the example scenario.
No conclusive judgment on the adherence to all requirements listed in Chapter 2 under all valid input conditions can be made without inspection of the source code. The demonstration evaluates the statically available information (the CWL document, and container image) as well as the outputs produced by a single example input dataset. It does not show how the validity and content of the generated output depends on the input dataset. While inputs are shown to be a directory containing STAC metadata, only inspection of the source code can establish whether the STAC is actually processed.
Furthermore, the demonstration purely evaluates the adherence of the software to the interoperability best practice and makes no attempt to judge the scientific validity of the data products produced.