Skip to content

Commit

Permalink
feat: add initial alos-2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Feb 20, 2025
1 parent bffd477 commit 5b08715
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SearchAPI/CMR/SubQuery.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def combine_params(self, params, extra_params):

def should_use_asf_frame(self):
asf_frame_platforms = ['SENTINEL-1A', 'SENTINEL-1B', 'ALOS']
asf_frame_datasets = ['SENTINEL-1', 'OPERA-S1', 'SLC-BURST', 'ALOS PALSAR', 'ALOS AVNIR-2']
asf_frame_datasets = ['SENTINEL-1', 'OPERA-S1', 'SLC-BURST', 'ALOS PALSAR', 'ALOS AVNIR-2', 'ALOS-2']

asf_frame_collections = []
for dataset in asf_frame_datasets:
Expand Down
3 changes: 3 additions & 0 deletions SearchAPI/CMR/Translate/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
"C2803501097-ASF",
],
"SLC-BURST": ["C2709161906-ASF", "C1257024016-ASF"],
"ALOS-2": [
"C3315903479-ASF"
],
"ALOS PALSAR": [
"C1206487504-ASF",
"C1206485940-ASF",
Expand Down
10 changes: 5 additions & 5 deletions SearchAPI/CMR/Translate/parse_cmr_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def remove_field(f):
if 'frameNumber' in req_fields:
asf_frame_platforms = [
'Sentinel-1A', 'Sentinel-1B', 'ALOS', 'SENTINEL-1A', 'SENTINEL-1B',
'ERS-1', 'ERS-2', 'JERS-1', 'RADARSAT-1'
'ERS-1', 'ERS-2', 'JERS-1', 'RADARSAT-1', 'ALOS-2'
]

if result['platform'] in asf_frame_platforms:
Expand All @@ -90,7 +90,7 @@ def remove_field(f):
result['fileName'] = file_name.split('/')[-1] if file_name else None
remove_field('fileName')

if 'stateVectors' in req_fields or ('canInsar' in req_fields and result['platform'] not in ['ALOS', 'RADARSAT-1', 'JERS-1', 'ERS-1', 'ERS-2']):
if 'stateVectors' in req_fields or ('canInsar' in req_fields and result['platform'] not in ['ALOS', 'ALOS-2', 'RADARSAT-1', 'JERS-1', 'ERS-1', 'ERS-2']):
def parse_sv(sv):
def float_or_none(a):
try:
Expand Down Expand Up @@ -131,7 +131,7 @@ def float_or_none(a):
remove_field('stateVectors')

if 'canInsar' in req_fields:
if result['platform'] in ['ALOS', 'RADARSAT-1', 'JERS-1', 'ERS-1', 'ERS-2']:
if result['platform'] in ['ALOS', 'ALOS-2', 'RADARSAT-1', 'JERS-1', 'ERS-1', 'ERS-2']:
result['insarGrouping'] = get_val(field_paths['insarGrouping'])

insarBaseline = get_val(field_paths['insarBaseline'])
Expand Down Expand Up @@ -204,9 +204,9 @@ def float_or_none(a):
if len(urls):
result['downloadUrl'] = urls[0]
result['fileName'] = result['granuleName'] + '.' + urls[0].split('.')[-1]
if result['platform'] in ['ALOS-2']:
result['beamMode'] = get_val(attr_path('BEAM_MODE'))



def get_all_urls():
accessPath = './OnlineAccessURLs/OnlineAccessURL/URL'
resourcesPath = './OnlineResources/OnlineResource/URL'
Expand Down

0 comments on commit 5b08715

Please sign in to comment.