From d4e7aa3e767acfbdb6c5aae9c033e19c96057774 Mon Sep 17 00:00:00 2001 From: Gustavo Shiroma Date: Thu, 23 Mar 2023 13:04:18 -0700 Subject: [PATCH 1/2] rename PROCESSING_DATA_TIME to PROCESSING_DATE_TIME; update the list of metadata fields to exclude from comparison --- app/rtc_compare.py | 5 +++-- src/rtc/h5_prep.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/rtc_compare.py b/app/rtc_compare.py index f8198344..9c9674c7 100755 --- a/app/rtc_compare.py +++ b/app/rtc_compare.py @@ -697,8 +697,9 @@ def _compare_rtc_s1_metadata(metadata_1, metadata_2): ' but it is not present in input 2') break # Exclude metadata fields that are not required to be the same - if k1 in ['PROCESSING_DATETIME', 'DEM_SOURCE', 'LANDCOVER_SOURCE', - 'WORLDCOVER_SOURCE']: + if k1 in ['PROCESSING_DATE_TIME', 'DEM_SOURCE', 'ISCE3_VERSION', + 'ANNOTATION_FILES', 'CONFIG_FILES', 'DEM_FILES', + 'ORBIT_FILES']: continue if metadata_2[k1] != v1: flag_same_metadata = False diff --git a/src/rtc/h5_prep.py b/src/rtc/h5_prep.py index 71f91366..2646292f 100644 --- a/src/rtc/h5_prep.py +++ b/src/rtc/h5_prep.py @@ -304,7 +304,7 @@ def get_metadata_dict(product_id: str, 'NOMINAL (or) URGENT (or) CUSTOM (or) UNDEFINED'], # datetime format 'YYYY-MM-DD HH:MM:SS' 'identification/processingDateTime': - ['processing_data_time', + ['PROCESSING_DATE_TIME', datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ"), 'Processing date and time'], 'identification/productVersion': From 64f37635e17498aca1d1962cb6c255f37866a5af Mon Sep 17 00:00:00 2001 From: Gustavo Shiroma Date: Thu, 23 Mar 2023 13:11:05 -0700 Subject: [PATCH 2/2] make PROCESSING_DATE_TIME lowercase --- src/rtc/h5_prep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtc/h5_prep.py b/src/rtc/h5_prep.py index 2646292f..7a85b874 100644 --- a/src/rtc/h5_prep.py +++ b/src/rtc/h5_prep.py @@ -304,7 +304,7 @@ def get_metadata_dict(product_id: str, 'NOMINAL (or) URGENT (or) CUSTOM (or) UNDEFINED'], # datetime format 'YYYY-MM-DD HH:MM:SS' 'identification/processingDateTime': - ['PROCESSING_DATE_TIME', + ['processing_date_time', datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ"), 'Processing date and time'], 'identification/productVersion':