From 92e2aac879b7ae252c229a0b3a59a2d9ceb92d7a Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Thu, 16 Jan 2025 13:09:57 -0500 Subject: [PATCH 1/5] Include bandpass coefficients for S2C. --- Dockerfile | 1 + hls_libs/L8like/bandpass_parameter.S2C.txt | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 hls_libs/L8like/bandpass_parameter.S2C.txt diff --git a/Dockerfile b/Dockerfile index d9eea1b..46268b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -106,6 +106,7 @@ RUN cd ${SRC_DIR}/trim \ COPY ./hls_libs/L8like/bandpass_parameter.S2A.txt ${PREFIX}/bandpass_parameter.S2A.txt COPY ./hls_libs/L8like/bandpass_parameter.S2B.txt ${PREFIX}/bandpass_parameter.S2B.txt +COPY ./hls_libs/L8like/bandpass_parameter.S2C.txt ${PREFIX}/bandpass_parameter.S2C.txt RUN pip3 install --upgrade awscli RUN pip3 install click==7.1.2 diff --git a/hls_libs/L8like/bandpass_parameter.S2C.txt b/hls_libs/L8like/bandpass_parameter.S2C.txt new file mode 100644 index 0000000..3f13f7e --- /dev/null +++ b/hls_libs/L8like/bandpass_parameter.S2C.txt @@ -0,0 +1,8 @@ +slope_2C offset_2C +1.003 -0.0 +0.9851 -0.0027 +1.0038 -0.0009 +0.9718 0.0011 +0.9995 -0.0003 +0.9994 -0.0007 +0.991 0.0004 From 0d992faf0a87abc2bb478c23c4983780aca857ba Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Thu, 16 Jan 2025 13:10:53 -0500 Subject: [PATCH 2/5] Use updated hls-metadata utility which includes Sentinel-2C platform. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 46268b8..f640978 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,7 +113,7 @@ RUN pip3 install click==7.1.2 RUN pip3 install rio-cogeo==1.1.10 --no-binary rasterio --user RUN pip3 install git+https://github.com/NASA-IMPACT/hls-thumbnails@v1.3 -RUN pip3 install git+https://github.com/NASA-IMPACT/hls-metadata@v2.5 +RUN pip3 install git+https://github.com/NASA-IMPACT/hls-metadata@v2.6 RUN pip3 install git+https://github.com/NASA-IMPACT/hls-manifest@v2.0 From 9fa2be8e6666edac02ed90e28735514cdeba04c6 Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Fri, 17 Jan 2025 10:17:59 -0500 Subject: [PATCH 3/5] Use new hls-base image with updated Fmask 4.7 to support Sentinel 2C. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f640978..4c67abf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM 018923174646.dkr.ecr.us-west-2.amazonaws.com/hls-base-3.5.1 +FROM 018923174646.dkr.ecr.us-west-2.amazonaws.com/hls-base:36 ENV PREFIX=/usr/local \ SRC_DIR=/usr/local/src \ GCTPLIB=/usr/local/lib \ From c3d78728b75ca19e43062ae6adb97ff383567f5a Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Fri, 17 Jan 2025 11:14:06 -0500 Subject: [PATCH 4/5] Use explicit Fmask version shell call rather than hls-base run_Fmask.sh. --- scripts/sentinel_granule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sentinel_granule.sh b/scripts/sentinel_granule.sh index d79efdf..1940a17 100755 --- a/scripts/sentinel_granule.sh +++ b/scripts/sentinel_granule.sh @@ -67,7 +67,7 @@ cloud_cover_valid=$(check_sentinel_clouds "$xml_safe") cd "$safegranuledir" # Run Fmask -run_Fmask.sh >> fmask_out.txt +/usr/local/MATLAB/application/run_Fmask_4_7.sh /usr/local/MATLAB/v910 /usr/local/MATLAB/application/AuxiData/ >> fmask_out.txt wait fmask_file=$(cat fmask_out.txt) echo "$fmask_file" From caa25add3c3d1cdc988ebcf0a71aa5a07c07f110 Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Fri, 17 Jan 2025 12:27:23 -0500 Subject: [PATCH 5/5] MATLAB bundled runtime path has changed for Fmask 4.7. --- scripts/sentinel_granule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sentinel_granule.sh b/scripts/sentinel_granule.sh index 1940a17..6637eec 100755 --- a/scripts/sentinel_granule.sh +++ b/scripts/sentinel_granule.sh @@ -67,7 +67,7 @@ cloud_cover_valid=$(check_sentinel_clouds "$xml_safe") cd "$safegranuledir" # Run Fmask -/usr/local/MATLAB/application/run_Fmask_4_7.sh /usr/local/MATLAB/v910 /usr/local/MATLAB/application/AuxiData/ >> fmask_out.txt +/usr/local/MATLAB/application/run_Fmask_4_7.sh /usr/local/MATLAB/R2022b /usr/local/MATLAB/application/AuxiData/ >> fmask_out.txt wait fmask_file=$(cat fmask_out.txt) echo "$fmask_file"