From 10b478e945cad26640e697106678015a319dce4a Mon Sep 17 00:00:00 2001 From: kim Date: Wed, 29 Nov 2023 08:22:50 -0900 Subject: [PATCH 1/5] adds calval products to opera s1 dataset --- SearchAPI/CMR/Translate/datasets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SearchAPI/CMR/Translate/datasets.py b/SearchAPI/CMR/Translate/datasets.py index 9f352b05..5eb2a1f3 100644 --- a/SearchAPI/CMR/Translate/datasets.py +++ b/SearchAPI/CMR/Translate/datasets.py @@ -128,6 +128,10 @@ "C1260721945-ASF", "C1260721853-ASF", "C1260726378-ASF", + "C2803502140-ASF", # OPERA_L2_CSLC-S1-STATIC_CALVAL_V1 + "C2803501758-ASF", # OPERA_L2_CSLC-S1_CALVAL_V1 + "C2803501097-ASF", # OPERA_L2_RTC-S1_CALVAL_V1 + "C2803500298-ASF" # OPERA_L2_RTC-S1-STATIC_CALVAL_V1 ], "SLC-BURST": ["C2709161906-ASF", "C1257024016-ASF"], "ALOS PALSAR": [ From d4d1b4e9165c68c4982c9c624eba95b0662fc83a Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 5 Dec 2023 11:12:18 -0900 Subject: [PATCH 2/5] adds validity start date for static opera product types --- SearchAPI/CMR/Output/jsonlite.py | 4 +++- SearchAPI/CMR/Translate/parse_cmr_response.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/SearchAPI/CMR/Output/jsonlite.py b/SearchAPI/CMR/Output/jsonlite.py index 6fabc9db..4070735a 100644 --- a/SearchAPI/CMR/Output/jsonlite.py +++ b/SearchAPI/CMR/Output/jsonlite.py @@ -181,7 +181,9 @@ def getItem(self, p): if p.get('operaBurstID') is not None or result['productID'].startswith('OPERA'): result['opera'] = { 'operaBurstID': p.get('operaBurstID'), - 'additionalUrls': p.get('additionalUrls') + 'additionalUrls': p.get('additionalUrls'), } + if p.get('ValidityStartDate'): + result['opera']['ValidityStartDate'] = p.get('ValidityStartDate') return result diff --git a/SearchAPI/CMR/Translate/parse_cmr_response.py b/SearchAPI/CMR/Translate/parse_cmr_response.py index 1a4ec8db..f59d0e41 100644 --- a/SearchAPI/CMR/Translate/parse_cmr_response.py +++ b/SearchAPI/CMR/Translate/parse_cmr_response.py @@ -212,6 +212,10 @@ def float_or_none(a): result['additionalUrls'] = list(set([*accessUrls, *OnlineResources])) result['configurationName'] = "Interferometric Wide. 250 km swath, 5 m x 20 m spatial resolution and burst synchronization for interferometry. IW is considered to be the standard mode over land masses." result['browse'] = [url for url in get_all_vals('./AssociatedBrowseImageUrls/ProviderBrowseUrl/URL') if not url.startswith('s3://')] + + if 'STATIC' in result['processingLevel']: + result['ValidityStartDate'] = get_val('./Temporal/SingleDateTime') + return result From bd5b2ecb3a6ac812d793e19efd617fb691a38b31 Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 5 Dec 2023 11:17:51 -0900 Subject: [PATCH 3/5] fixes capitalization --- SearchAPI/CMR/Output/jsonlite.py | 4 ++-- SearchAPI/CMR/Translate/parse_cmr_response.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SearchAPI/CMR/Output/jsonlite.py b/SearchAPI/CMR/Output/jsonlite.py index 4070735a..99795463 100644 --- a/SearchAPI/CMR/Output/jsonlite.py +++ b/SearchAPI/CMR/Output/jsonlite.py @@ -183,7 +183,7 @@ def getItem(self, p): 'operaBurstID': p.get('operaBurstID'), 'additionalUrls': p.get('additionalUrls'), } - if p.get('ValidityStartDate'): - result['opera']['ValidityStartDate'] = p.get('ValidityStartDate') + if p.get('validityStartDate'): + result['opera']['validityStartDate'] = p.get('validityStartDate') return result diff --git a/SearchAPI/CMR/Translate/parse_cmr_response.py b/SearchAPI/CMR/Translate/parse_cmr_response.py index f59d0e41..3868dd6e 100644 --- a/SearchAPI/CMR/Translate/parse_cmr_response.py +++ b/SearchAPI/CMR/Translate/parse_cmr_response.py @@ -214,7 +214,7 @@ def float_or_none(a): result['browse'] = [url for url in get_all_vals('./AssociatedBrowseImageUrls/ProviderBrowseUrl/URL') if not url.startswith('s3://')] if 'STATIC' in result['processingLevel']: - result['ValidityStartDate'] = get_val('./Temporal/SingleDateTime') + result['validityStartDate'] = get_val('./Temporal/SingleDateTime') return result From c4c0e5d659207c56ee6a98d31daec59f7b6f7ffd Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 5 Dec 2023 12:13:13 -0900 Subject: [PATCH 4/5] checks if providerbrowseUrls available --- SearchAPI/CMR/Translate/parse_cmr_response.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SearchAPI/CMR/Translate/parse_cmr_response.py b/SearchAPI/CMR/Translate/parse_cmr_response.py index 3868dd6e..1296c3cb 100644 --- a/SearchAPI/CMR/Translate/parse_cmr_response.py +++ b/SearchAPI/CMR/Translate/parse_cmr_response.py @@ -211,7 +211,9 @@ def float_or_none(a): OnlineResources = [url for url in get_all_vals('./OnlineResources/OnlineResource/URL') if not url.endswith('.md5') and not url.startswith('s3://') and not 's3credentials' in url] result['additionalUrls'] = list(set([*accessUrls, *OnlineResources])) result['configurationName'] = "Interferometric Wide. 250 km swath, 5 m x 20 m spatial resolution and burst synchronization for interferometry. IW is considered to be the standard mode over land masses." - result['browse'] = [url for url in get_all_vals('./AssociatedBrowseImageUrls/ProviderBrowseUrl/URL') if not url.startswith('s3://')] + + if (providerbrowseUrls := get_all_vals('./AssociatedBrowseImageUrls/ProviderBrowseUrl/URL')): + result['browse'] = [url for url in providerbrowseUrls if not url.startswith('s3://')] if 'STATIC' in result['processingLevel']: result['validityStartDate'] = get_val('./Temporal/SingleDateTime') From a2438b3f80412f7e9e0682550eca1c2a8446b568 Mon Sep 17 00:00:00 2001 From: Kim <33294735+SpicyGarlicAlbacoreRoll@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:13:12 -0900 Subject: [PATCH 5/5] Update datasets.py --- SearchAPI/CMR/Translate/datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SearchAPI/CMR/Translate/datasets.py b/SearchAPI/CMR/Translate/datasets.py index 8b0071b7..e3d9205a 100644 --- a/SearchAPI/CMR/Translate/datasets.py +++ b/SearchAPI/CMR/Translate/datasets.py @@ -114,8 +114,8 @@ "OPERA-S1": [ "C2777443834-ASF", "C2777436413-ASF", - "C2795135174-ASF", # RTC-STATIC - "C2795135668-ASF", # CSLC-STATIC + "C2795135174-ASF", # RTC-STATIC + "C2795135668-ASF", # CSLC-STATIC "C1258354200-ASF", # maybe extra? "C1259982010-ASF", "C1257995185-ASF",