-
Notifications
You must be signed in to change notification settings - Fork 6
CSLC S1 Interface Acceptance Testing Instructions
This page contains instructions for performing Acceptance Testing for the CSLC-S1 interface delivery from the OPERA-ADT team. These instructions assume the user has access to the JPL FN-Artifactory, and has Docker installed on their local machine.
The image is currently hosted on JPL FN-Artifactory, which requires JPL VPN access and JPL credentials. You may also need to be added to the gov.nasa.jpl.opera.adt organization.
Once you have access, the container tarball delivery is available under general/gov/nasa/jpl/opera/adt/cslc_s1/r2.1/interface/dockerimg_cslc_s1_interface_0.1.tar
. Sample inputs and outputs are also available under general/gov/nasa/jpl/opera/adt/cslc_s1/r2.1/interface/delivery_cslc_s1_interface_0.1.zip
.
Download both images to a location on your local machine. This location will be referred to throughout this instructions as <CSLC_DIR>
Note that the sample data is quite large, so the download from AF can take some time.
The first step in running the CSLC-S1 image is to load it into Docker via the following command:
docker load -i <CSLC_DIR>/dockerimg_cslc_s1_interface_0.1.tar
This should add the Docker image to your local repository with the name opera/cslc_s1
and the tag interface_0.1
.
Once the delivery_cslc_s1_interface_0.1.zip
file is downloaded to your local machine, unpack it to <CSLC_DIR>
:
cd <CSLC_DIR>; unzip delivery_cslc_s1_interface_0.1.zip
This will create a delivery_cslc_s1_interface_0.1
directory within <CSLC_DIR>
containing the following files/directories:
- expected_output/
- input_data/
- output_s1_cslc/
- scratch_s1_cslc/
- runconfig_cslc_t64_135524_iw2.yaml
In order to execute the SAS, the input file directory, runconfig, scratch and output locations will be mounted into the container instance as Docker Volumes. To help streamline this process, we recommend making the following changes within the delivery_cslc_s1_interface_0.1
directory:
-
Create a directory named
runconfig
, and copy and rename the existing runconfig YAML file into it:mkdir -p <CSLC_DIR>/delivery_cslc_s1_interface_0.1/runconfig
cp <CSLC_DIR>/delivery_cslc_s1_interface_0.1/runconfig_cslc_t64_135524_iw2.yaml <CSLC_DIR>/delivery_cslc_s1_interface_0.1/runconfig/cslc_s1.yaml
-
Make sure the output and scratch directories have write permissions set
chmod ga+w output_s1_cslc/ scratch_s1_clsc/
We're now ready to execute the CSLC-S1 Interface. Run the following the command to kick off execution with the test assets:
docker run --rm -u 1000:1000 \
-w /home/compass_user \
-v <CSLC_DIR>/delivery_cslc_s1_interface_0.1/runconfig:/home/compass_user/runconfig:ro \
-v <CSLC_DIR>/delivery_cslc_s1_interface_0.1/input_data:/home/compass_user/input_data:ro \
-v <CSLC_DIR>/delivery_cslc_s1_interface_0.1/output_s1_cslc:/home/compass_user/output_s1_cslc \
-v <CSLC_DIR>/delivery_cslc_s1_interface_0.1/scratch_s1_cslc:/home/compass_user/scratch_s1_cslc \
-i --tty opera/cslc_s1:interface_0.1 -- runconfig/cslc_s1.yaml
Note that the interface delivery does not produce any console output until processing has completed. Execution should only take roughly 5-10 minutes. Once execution is complete, you should see t64_135524_iw2_20220501_VV.slc
and t64_135524_iw2_20220501_VV.json
files within the <CSLC_DIR>/delivery_cslc_s1_interface_0.1/output_s1_cslc/output_s1_cslc/t64_135524_iw2/20220501
directory.
Now that we've successfully executed the SAS container and generated outputs, the last step is to perform a QA check against the expected outputs.
Download a copy of the following python script to <CSLC_DIR>
: https://raw.githubusercontent.com/opera-adt/COMPASS/main/src/compass/utils/validate_cslc.py
Now execute the QA script to compare both the .slc and .json products against the expected. Note that this requires a Python environment with both numpy
and osgeo
installed:
python3 validate_cslc.py \
--ref-product <CSLC_DIR>/delivery_cslc_s1_interface_0.1/expected_output/t64_135524_iw2/20220501/t64_135524_iw2_20220501_VV.slc \
--sec-product <CSLC_DIR>/delivery_cslc_s1_interface_0.1/output_s1_cslc/t64_135524_iw2/20220501/t64_135524_iw2_20220501_VV.slc \
--ref-metadata <CSLC_DIR>/delivery_cslc_s1_interface_0.1/expected_output/t64_135524_iw2/20220501/t64_135524_iw2_20220501_VV.json \
--sec-metadata <CSLC_DIR>/delivery_cslc_s1_interface_0.1/output_s1_cslc/t64_135524_iw2/20220501/t64_135524_iw2_20220501_VV.json
Where --ref-product
and --ref-metadata
should point to the expected versions of the .slc and .json products, respectively, and --sec-product
and --sec-metadata
should point to the versions generated by this Acceptance Test.
The following console output should be returned:
Comparing CSLC number of bands ...
Comparing geo transform arrays ...
Check mean real part difference between CSLC products is < 1.0e-5
Check mean imaginary part difference between CSLC products is < 1.0e-5
All CSLC product checks have passed
All CSLC metadata checks have passed
The expected results for this Acceptance Test are to see the All CSLC product checks have passed
and All CSLC metadata checks have passed
messages returned from the validation script. If the actual results differ, the output products from the Acceptance Test, as well as the results of the comparison script should be provided to ADT for diagnostics.